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: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: none
Credits
These definitions were written by Cyril Schumacher.