mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
typings: define types for os binding
PR-URL: https://github.com/nodejs/node/pull/40222 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
parent
70a5b86049
commit
9467cbadcb
@ -6,6 +6,7 @@
|
||||
"./typings/internalBinding/http_parser.d.ts",
|
||||
"./typings/internalBinding/messaging.d.ts",
|
||||
"./typings/internalBinding/options.d.ts",
|
||||
"./typings/internalBinding/os.d.ts",
|
||||
"./typings/internalBinding/serdes.d.ts",
|
||||
"./typings/internalBinding/timers.d.ts",
|
||||
"./typings/internalBinding/util.d.ts",
|
||||
|
21
typings/internalBinding/os.d.ts
vendored
Normal file
21
typings/internalBinding/os.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
declare function InternalBinding(binding: 'os'): {
|
||||
getHostname(ctx: {}): string | undefined;
|
||||
getLoadAvg(array: Float64Array): void;
|
||||
getUptime(): number;
|
||||
getTotalMem(): number;
|
||||
getFreeMem(): number;
|
||||
getCPUs(): Array<string | number>;
|
||||
getInterfaceAddresses(ctx: {}): Array<string | number | boolean> | undefined;
|
||||
getHomeDirectory(ctx: {}): string | undefined;
|
||||
getUserInfo(options: { encoding?: string } | undefined, ctx: {}): {
|
||||
uid: number;
|
||||
gid: number;
|
||||
username: string;
|
||||
homedir: string;
|
||||
shell: string | null;
|
||||
} | undefined;
|
||||
setPriority(pid: number, priority: number, ctx: {}): number;
|
||||
getPriority(pid: number, ctx: {}): number | undefined;
|
||||
getOSInformation(ctx: {}): [sysname: string, version: string, release: string];
|
||||
isBigEndian: boolean;
|
||||
};
|
Loading…
Reference in New Issue
Block a user