Restore types for p-wait-for v1.0 (#30640)

This commit is contained in:
Dimitri Benin
2018-11-19 08:27:36 -08:00
committed by Pranav Senthilnathan
parent fa44bbf144
commit e8e967a8f2
4 changed files with 41 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for p-wait-for 1.0
// Project: https://github.com/sindresorhus/p-wait-for#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = pWaitFor;
declare function pWaitFor(condition: () => PromiseLike<boolean> | boolean, interval?: number): Promise<void>;
+6
View File
@@ -0,0 +1,6 @@
import pWaitFor = require('p-wait-for');
pWaitFor(() => Promise.resolve(false)).then(() => {});
pWaitFor(() => Promise.resolve(true), 1).then(() => {});
pWaitFor(() => false).then(() => {});
pWaitFor(() => true, 1).then(() => {});
+26
View File
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../../",
"typeRoots": [
"../../"
],
"paths": {
"p-wait-for": [ "p-wait-for/v1" ]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"p-wait-for-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }