mirror of
https://github.com/denoland/deno.git
synced 2024-12-26 09:10:40 -05:00
900929f65c
This commit adds sync versions of async APIs to "Deno.permissions" namespace. Following APIs were added: - "Deno.permissions.querySync" - "Deno.permissions.requestSync" - "Deno.permissions.revokeSync"
8 lines
317 B
TypeScript
8 lines
317 B
TypeScript
const status1 =
|
|
Deno.permissions.requestSync({ name: "read", path: "foo" }).state;
|
|
const status2 = Deno.permissions.querySync({ name: "read", path: "bar" }).state;
|
|
const status3 =
|
|
Deno.permissions.requestSync({ name: "read", path: "bar" }).state;
|
|
console.log(status1);
|
|
console.log(status2);
|
|
console.log(status3);
|