diff options
author | Michaël Zasso <targos@protonmail.com> | 2021-09-26 17:28:40 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-10-10 12:03:52 +0300 |
commit | 9467cbadcbe350d802887e10ec9ee6660f15706b (patch) | |
tree | 4c6e769fea403b82b609564de94f44e6cd3ad1e6 /typings | |
parent | 70a5b860491b3908a8b80bed2b62f353d296359e (diff) |
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>
Diffstat (limited to 'typings')
-rw-r--r-- | typings/internalBinding/os.d.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/typings/internalBinding/os.d.ts b/typings/internalBinding/os.d.ts new file mode 100644 index 00000000000..cdddc330151 --- /dev/null +++ b/typings/internalBinding/os.d.ts @@ -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; +}; |