mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
28 lines
720 B
TypeScript
28 lines
720 B
TypeScript
// Type definitions for usage
|
|
// Project: https://github.com/arunoda/node-usage
|
|
// Definitions by: Pascal Vomhoff <https://github.com/pvomhoff>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare module "usage" {
|
|
|
|
export interface ResultObject {
|
|
memory:number;
|
|
memoryInfo: {
|
|
rss:number;
|
|
vsize:number;
|
|
}
|
|
cpu:number;
|
|
}
|
|
|
|
export interface Options {
|
|
keepHistory:boolean;
|
|
}
|
|
|
|
export function lookup(pid:number, callback:(err:Error, result:ResultObject) => void):void;
|
|
export function lookup(pid:number, options:Options, callback:(err:Error, result:ResultObject) => void):void;
|
|
|
|
//Only availible on linux
|
|
export function clearHistory(pid?:number):void;
|
|
|
|
|
|
} |