Skip to content

Commit 4dfc389

Browse files
daeyeontargos
authored andcommitted
doc: improve permission.has description
This fixes the function description and adds missing available scopes. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #47875 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 515c9b8 commit 4dfc389

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/api/permissions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ When enabling the Permission Model through the [`--experimental-permission`][]
494494
flag a new property `permission` is added to the `process` object.
495495
This property contains one function:
496496

497-
##### `permission.has(scope ,parameters)`
497+
##### `permission.has(scope[, reference])`
498498

499499
API call to check permissions at runtime ([`permission.has()`][])
500500

doc/api/process.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2640,7 +2640,7 @@ for the current process. Additional documentation is available in the
26402640
added: v20.0.0
26412641
-->
26422642
2643-
* `scopes` {string}
2643+
* `scope` {string}
26442644
* `reference` {string}
26452645
* Returns: {boolean}
26462646
@@ -2657,6 +2657,8 @@ The available scopes are:
26572657
* `fs` - All File System
26582658
* `fs.read` - File System read operations
26592659
* `fs.write` - File System write operations
2660+
* `child` - Child process spawning operations
2661+
* `worker` - Worker thread spawning operation
26602662
26612663
```js
26622664
// Check if the process has permission to read the README file

0 commit comments

Comments
 (0)