Installation
npm install --save @types/pidusage
Summary
This package contains type definitions for pidusage (https://github.com/soyuka/pidusage).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pidusage.
interface Stat {
cpu: number;
memory: number;
ppid: number;
pid: number;
ctime: number;
elapsed: number;
timestamp: number;
}
declare function pidusage(pid: number | string, callback: (err: Error | null, stats: Stat) => void): void;
declare function pidusage(pid: number | string, options: { [key: string]: any }, callback: (err: Error | null, stats: Stat) => void): void;
declare function pidusage(pids: Array<number | string>, callback: (err: Error | null, stats: { [key: string]: Stat }) => void): void;
declare function pidusage(pids: Array<number | string>, options: { [key: string]: any }, callback: (err: Error | null, stats: { [key: string]: Stat }) => void): void;
declare function pidusage(pid: number | string, options?: { [key: string]: any }): Promise<Stat>;
declare function pidusage(pids: Array<number | string>, options?: { [key: string]: any }): Promise<{ [key: string]: Stat }>;
declare namespace pidusage {
type Status = Stat;
function clear(): void;
}
export = pidusage;
Additional Details
- Last updated: Thu, 23 Dec 2021 23:35:17 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Cyril Schumacher.