mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Added typings for "heapdump". (#20716)
* Added typings for "require-dir". * Fixed dtslint errors. * Fixed By field. * Added typings for "restify-cookies". * Added "cookies" field to Request interface. * Added typings for "heapdump".
This commit is contained in:
9
types/heapdump/heapdump-tests.ts
Normal file
9
types/heapdump/heapdump-tests.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import * as heapdump from 'heapdump';
|
||||
|
||||
heapdump.writeSnapshot('/tmp/myDump', (err) => {
|
||||
if (err) {
|
||||
console.log('Failed to dump heap: ' + err);
|
||||
} else {
|
||||
console.log('Successfully dumped heap!');
|
||||
}
|
||||
});
|
||||
6
types/heapdump/index.d.ts
vendored
Normal file
6
types/heapdump/index.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// Type definitions for heapdump 0.3
|
||||
// Project: https://github.com/bnoordhuis/node-heapdump
|
||||
// Definitions by: weekens <https://github.com/weekens>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export function writeSnapshot(dumpFileName: string, callback: (err?: Error) => void): void;
|
||||
25
types/heapdump/tsconfig.json
Normal file
25
types/heapdump/tsconfig.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"heapdump-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/heapdump/tslint.json
Normal file
1
types/heapdump/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user