mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
typings: add credentials internal binding types
Add a CredentialsBinding declaration for internalBinding('credentials')
and wire it into InternalBindingMap.
Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/65036
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
This commit is contained in:
1 parent
6f9e0846ea
commit
9fc811a0f2
2 files changed
+20
No files matched your search
Vendored
+2
@@ -5,6 +5,7 @@ import { BufferBinding } from './internalBinding/buffer';
|
||||
import { CJSLexerBinding } from './internalBinding/cjs_lexer';
|
||||
import { ConfigBinding } from './internalBinding/config';
|
||||
import { ConstantsBinding } from './internalBinding/constants';
|
||||
import { CredentialsBinding } from './internalBinding/credentials';
|
||||
import { CryptoBinding } from './internalBinding/crypto';
|
||||
import { DebugBinding } from './internalBinding/debug';
|
||||
import { EncodingBinding } from './internalBinding/encoding_binding';
|
||||
@@ -44,6 +45,7 @@ interface InternalBindingMap {
|
||||
cjs_lexer: CJSLexerBinding;
|
||||
config: ConfigBinding;
|
||||
constants: ConstantsBinding;
|
||||
credentials: CredentialsBinding;
|
||||
crypto: CryptoBinding;
|
||||
debug: DebugBinding;
|
||||
encoding_binding: EncodingBinding;
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
export interface CredentialsBinding {
|
||||
implementsPosixCredentials?: true;
|
||||
safeGetenv(key: string): string | undefined;
|
||||
getTempDir(): string | undefined;
|
||||
|
||||
getuid?(): number;
|
||||
geteuid?(): number;
|
||||
getgid?(): number;
|
||||
getegid?(): number;
|
||||
getgroups?(): number[];
|
||||
|
||||
initgroups?(user: string | number, extraGroup: string | number): 0 | 1 | 2;
|
||||
setegid?(id: string | number): 0 | 1;
|
||||
seteuid?(id: string | number): 0 | 1;
|
||||
setgid?(id: string | number): 0 | 1;
|
||||
setuid?(id: string | number): 0 | 1;
|
||||
setgroups?(groups: Array<string | number>): number;
|
||||
}
|
||||
Reference in new issue
Block a user