[p-do-whilst] add typings (#18883)

This commit is contained in:
Dimitri Benin
2017-08-14 10:13:51 -07:00
committed by Mohamed Hegazy
parent 6f61683fbf
commit 38c1dc49ff
4 changed files with 36 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for p-do-whilst 0.1
// Project: https://github.com/sindresorhus/p-do-whilst#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = pDoWhilst;
declare function pDoWhilst(action: () => any, condition: () => boolean): Promise<void>;
+5
View File
@@ -0,0 +1,5 @@
import pDoWhilst = require('p-do-whilst');
let count = 0;
pDoWhilst(() => count++, () => count < 5).then(() => {});
+22
View File
@@ -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",
"p-do-whilst-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }