GeezerVison is showing github.com — typings: define types for os binding · nodejs/node@9467cba
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: tsconfig.json +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
6 | 6 | "./typings/internalBinding/http_parser.d.ts", |
7 | 7 | "./typings/internalBinding/messaging.d.ts", |
8 | 8 | "./typings/internalBinding/options.d.ts", |
| 9 | + "./typings/internalBinding/os.d.ts", |
9 | 10 | "./typings/internalBinding/serdes.d.ts", |
10 | 11 | "./typings/internalBinding/timers.d.ts", |
11 | 12 | "./typings/internalBinding/util.d.ts", |
|
Collapse file
Copy file name to clipboard +21Lines changed: 21 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +declare function InternalBinding(binding: 'os'): { |
| 2 | + getHostname(ctx: {}): string | undefined; |
| 3 | + getLoadAvg(array: Float64Array): void; |
| 4 | + getUptime(): number; |
| 5 | + getTotalMem(): number; |
| 6 | + getFreeMem(): number; |
| 7 | + getCPUs(): Array<string | number>; |
| 8 | + getInterfaceAddresses(ctx: {}): Array<string | number | boolean> | undefined; |
| 9 | + getHomeDirectory(ctx: {}): string | undefined; |
| 10 | + getUserInfo(options: { encoding?: string } | undefined, ctx: {}): { |
| 11 | + uid: number; |
| 12 | + gid: number; |
| 13 | + username: string; |
| 14 | + homedir: string; |
| 15 | + shell: string | null; |
| 16 | + } | undefined; |
| 17 | + setPriority(pid: number, priority: number, ctx: {}): number; |
| 18 | + getPriority(pid: number, ctx: {}): number | undefined; |
| 19 | + getOSInformation(ctx: {}): [sysname: string, version: string, release: string]; |
| 20 | + isBigEndian: boolean; |
| 21 | +}; |