mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-10 11:40:16 +08:00
Add typings for module usage
This commit is contained in:
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
// Type definitions for usage
|
||||
// Project: https://github.com/arunoda/node-usage
|
||||
// Definitions by: Pascal Vomhoff <https://github.com/pvomhoff>
|
||||
// Definitions: https://github.com/borisyankov/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);
|
||||
export function lookup(pid:number, options:Options, callback:(err:Error, result:ResultObject) => void);
|
||||
|
||||
//Only availible on linux
|
||||
export function clearHistory(pid?:number);
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user