From c910106722fd7290f2b61ebfde1e965ec9f88da7 Mon Sep 17 00:00:00 2001 From: Daeyeon Jeong Date: Fri, 5 May 2023 04:30:35 +0900 Subject: [PATCH] doc: improve `permission.has` description This fixes the function description and adds missing available scopes. Signed-off-by: Daeyeon Jeong --- doc/api/permissions.md | 2 +- doc/api/process.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api/permissions.md b/doc/api/permissions.md index bbe7e49a6bbe6b..cc899d418f3414 100644 --- a/doc/api/permissions.md +++ b/doc/api/permissions.md @@ -494,7 +494,7 @@ When enabling the Permission Model through the [`--experimental-permission`][] flag a new property `permission` is added to the `process` object. This property contains one function: -##### `permission.has(scope ,parameters)` +##### `permission.has(scope[, reference])` API call to check permissions at runtime ([`permission.has()`][]) diff --git a/doc/api/process.md b/doc/api/process.md index a9d75e8ef4c359..27bc7a333bb53c 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -2640,7 +2640,7 @@ for the current process. Additional documentation is available in the added: v20.0.0 --> -* `scopes` {string} +* `scope` {string} * `reference` {string} * Returns: {boolean} @@ -2657,6 +2657,8 @@ The available scopes are: * `fs` - All File System * `fs.read` - File System read operations * `fs.write` - File System write operations +* `child` - Child process spawning operations +* `worker` - Worker thread spawning operation ```js // Check if the process has permission to read the README file