1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-27 16:10:57 -05:00
denoland-deno/cli/tests/testdata/run/permissions_cache.ts

6 lines
284 B
TypeScript
Raw Normal View History

const status = await Deno.permissions.query({ name: "read", path: "foo" });
console.log(status.state);
status.onchange = () => console.log(status.state);
await Deno.permissions.request({ name: "read", path: "foo" }); // y
await Deno.permissions.revoke({ name: "read", path: "foo" });