diff options
author | crowlKats <13135287+crowlKats@users.noreply.github.com> | 2021-03-06 12:24:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-06 13:24:43 +0100 |
commit | 2894c0e615bf99e86f80ab1d2c7278be9769a52b (patch) | |
tree | b42b6001bf8e9243d90081386cd62ee3790fc16c /docs/runtime | |
parent | 8e01e232996b38b751ba6c2cf2638152a758a3c3 (diff) |
chore: remove unstable from permission (#9701)
Diffstat (limited to 'docs/runtime')
-rw-r--r-- | docs/runtime/permission_apis.md | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/docs/runtime/permission_apis.md b/docs/runtime/permission_apis.md index 1b6f8096e..a71558526 100644 --- a/docs/runtime/permission_apis.md +++ b/docs/runtime/permission_apis.md @@ -1,8 +1,5 @@ ## Permission APIs -> This API is unstable. Learn more about -> [unstable features](../runtime/stability.md). - Permissions are granted from the CLI when running the `deno` command. User code will often assume its own set of required permissions, but there is no guarantee during execution that the set of _granted_ permissions will align with this. @@ -43,7 +40,7 @@ const desc5 = { name: "hrtime" } as const; Check, by descriptor, if a permission is granted or not. ```ts -// deno run --unstable --allow-read=/foo main.ts +// deno run --allow-read=/foo main.ts const desc1 = { name: "read", path: "/foo" } as const; console.log(await Deno.permissions.query(desc1)); @@ -96,7 +93,7 @@ const desc4 = { name: "net", host: "127.0.0.1:8000" } as const; Request an ungranted permission from the user via CLI prompt. ```ts -// deno run --unstable main.ts +// deno run main.ts const desc1 = { name: "read", path: "/foo" } as const; const status1 = await Deno.permissions.request(desc1); @@ -127,7 +124,7 @@ requests. Downgrade a permission from "granted" to "prompt". ```ts -// deno run --unstable --allow-read=/foo main.ts +// deno run --allow-read=/foo main.ts const desc = { name: "read", path: "/foo" } as const; console.log(await Deno.permissions.revoke(desc)); @@ -138,7 +135,7 @@ However, what happens when you try to revoke a permission which is _partial_ to one granted on the CLI? ```ts -// deno run --unstable --allow-read=/foo main.ts +// deno run --allow-read=/foo main.ts const desc = { name: "read", path: "/foo/bar" } as const; console.log(await Deno.permissions.revoke(desc)); @@ -175,7 +172,7 @@ set which the argument permission descriptor is _stronger than_. So to ensure whichever _explicitly granted permission descriptor_ is _stronger than_ `desc`. ```ts -// deno run --unstable --allow-read=/foo main.ts +// deno run --allow-read=/foo main.ts const desc = { name: "read", path: "/foo/bar" } as const; console.log(await Deno.permissions.revoke(desc)); // Insufficient. |