diff --git a/types/mocha-prepare/index.d.ts b/types/mocha-prepare/index.d.ts new file mode 100644 index 0000000000..c45f8f7167 --- /dev/null +++ b/types/mocha-prepare/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for mocha-prepare 0.1 +// Project: https://github.com/enobufs/mocha-prepare#readme +// Definitions by: Sorin Sandru +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/// + +declare function prepare(onPrepare: (fn: Mocha.Done) => void, onUnprepare?: (fn: Mocha.Done) => void): void; +export = prepare; diff --git a/types/mocha-prepare/mocha-prepare-tests.ts b/types/mocha-prepare/mocha-prepare-tests.ts new file mode 100644 index 0000000000..756a945d88 --- /dev/null +++ b/types/mocha-prepare/mocha-prepare-tests.ts @@ -0,0 +1,14 @@ +import prepare = require('mocha-prepare'); + +prepare( + done => { + done(); + }, + done => { + done(); + }, +); + +prepare(done => { + done(); +}); diff --git a/types/mocha-prepare/tsconfig.json b/types/mocha-prepare/tsconfig.json new file mode 100644 index 0000000000..7447487427 --- /dev/null +++ b/types/mocha-prepare/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "mocha-prepare-tests.ts" + ] +} diff --git a/types/mocha-prepare/tslint.json b/types/mocha-prepare/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/mocha-prepare/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }