mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
Restore types for p-wait-for v1.0 (#30640)
This commit is contained in:
committed by
Pranav Senthilnathan
parent
fa44bbf144
commit
e8e967a8f2
Vendored
+8
@@ -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>;
|
||||
@@ -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(() => {});
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user