DefinitelyTyped/types/node-memwatch/node-memwatch-tests.ts
Eunchong Yu b08cef6666 Add definition for node-memwatch
Some of types are brought from @cyrilschumacher's memwatch-next definition.
2018-06-25 23:39:28 +09:00

15 lines
275 B
TypeScript

import memwatch = require("node-memwatch");
memwatch.on("stats", info => {
info.estimated_base;
});
memwatch.on("leak", info => {
info.growth;
});
const hd = new memwatch.HeapDiff();
const diff = hd.end();
diff.change.allocated_nodes;
diff.change.details[0].what;