diff --git a/types/ofe/index.d.ts b/types/ofe/index.d.ts new file mode 100644 index 0000000000..663bc0510c --- /dev/null +++ b/types/ofe/index.d.ts @@ -0,0 +1,6 @@ +// Type definitions for ofe 0.5 +// Project: https://github.com/trevnorris/node-ofe +// Definitions by: Ben Davies +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function call(): 'done'; diff --git a/types/ofe/ofe-tests.ts b/types/ofe/ofe-tests.ts new file mode 100644 index 0000000000..002aecba23 --- /dev/null +++ b/types/ofe/ofe-tests.ts @@ -0,0 +1,8 @@ +/// + +import * as ofe from 'ofe'; + +let ret = ofe.call(); +if (ret === 'done') { + console.log('The ofe module was successfully called to create a heapdump if the process runs out of memory.'); +} diff --git a/types/ofe/tsconfig.json b/types/ofe/tsconfig.json new file mode 100644 index 0000000000..9c1f9c174a --- /dev/null +++ b/types/ofe/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ofe-tests.ts" + ] +} diff --git a/types/ofe/tslint.json b/types/ofe/tslint.json new file mode 100644 index 0000000000..b4b47a0378 --- /dev/null +++ b/types/ofe/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}