mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
typings: add typing for permission binding
Add type declarations for the `permission` internalBinding so lib/internal/process/permission.js gets editor autocomplete and type checking for `has()` and `drop()`. Signed-off-by: seungmin Nam <nhjbest22@g.skku.edu> PR-URL: https://github.com/nodejs/node/pull/65385 Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
6fa4968eec
commit
f01bc16dd1
2 files changed
+8
No files matched your search
Vendored
+2
@@ -23,6 +23,7 @@ import { MessagingBinding } from './internalBinding/messaging';
|
||||
import { ModulesBinding } from './internalBinding/modules';
|
||||
import { OptionsBinding } from './internalBinding/options';
|
||||
import { OSBinding } from './internalBinding/os';
|
||||
import { PermissionBinding } from './internalBinding/permission';
|
||||
import { ProcessBinding } from './internalBinding/process';
|
||||
import { ProcessWrapBinding } from './internalBinding/process_wrap';
|
||||
import { SeaBinding } from './internalBinding/sea';
|
||||
@@ -67,6 +68,7 @@ interface InternalBindingMap {
|
||||
modules: ModulesBinding;
|
||||
options: OptionsBinding;
|
||||
os: OSBinding;
|
||||
permission: PermissionBinding;
|
||||
process: ProcessBinding;
|
||||
process_wrap: ProcessWrapBinding;
|
||||
sea: SeaBinding;
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
type Buffer = Uint8Array;
|
||||
|
||||
export interface PermissionBinding {
|
||||
has(scope: string, reference?: string | Buffer | null): boolean;
|
||||
drop(scope: string, reference?: string | Buffer | null): void;
|
||||
}
|
||||
Reference in new issue
Block a user