-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
Expand file tree
/
Copy pathos.d.ts
More file actions
26 lines (25 loc) · 1.01 KB
/
os.d.ts
File metadata and controls
26 lines (25 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
declare namespace InternalOSBinding {
type OSContext = {};
}
export interface OSBinding {
getHostname(ctx: InternalOSBinding.OSContext): string | undefined;
getLoadAvg(array: Float64Array): void;
getUptime(): number;
getTotalMem(): number;
getFreeMem(): number;
getCPUs(): Array<string | number>;
getInterfaceAddresses(ctx: InternalOSBinding.OSContext): Array<string | number | boolean> | undefined;
getOnLineStatus(): boolean;
getHomeDirectory(ctx: InternalOSBinding.OSContext): string | undefined;
getUserInfo(options: { encoding?: string } | undefined, ctx: InternalOSBinding.OSContext): {
uid: number;
gid: number;
username: string;
homedir: string;
shell: string | null;
} | undefined;
setPriority(pid: number, priority: number, ctx: InternalOSBinding.OSContext): number;
getPriority(pid: number, ctx: InternalOSBinding.OSContext): number | undefined;
getOSInformation(ctx: InternalOSBinding.OSContext): [sysname: string, version: string, release: string];
isBigEndian: boolean;
}