Created typings for mocha-prepare (#38727)

* mocha-prepare

Created typings for mocha-prepare.

* Fixed Export issue

Fixed export

* Fixed onUnprepare parameter

Changed onUnprepare parameter to optional.
This commit is contained in:
Sorin Sandru
2019-10-02 13:34:54 -07:00
committed by Ryan Cavanaugh
parent 41d9712db2
commit 2e9ba8c063
4 changed files with 48 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
// Type definitions for mocha-prepare 0.1
// Project: https://github.com/enobufs/mocha-prepare#readme
// Definitions by: Sorin Sandru <https://github.com/idono87>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/// <reference types="mocha"/>
declare function prepare(onPrepare: (fn: Mocha.Done) => void, onUnprepare?: (fn: Mocha.Done) => void): void;
export = prepare;
@@ -0,0 +1,14 @@
import prepare = require('mocha-prepare');
prepare(
done => {
done();
},
done => {
done();
},
);
prepare(done => {
done();
});
+23
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }