mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
Add typings for yoctodelay (#27592)
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for yoctodelay 1.1
|
||||
// Project: https://github.com/sindresorhus/yoctodelay#readme
|
||||
// Definitions by: Sean Marvi Oliver Genabe <https://github.com/seangenabe>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Delay the promise and then resolve.
|
||||
* @param ms Milliseconds to delay the promise.
|
||||
*/
|
||||
declare function delay(ms: number): Promise<void>;
|
||||
|
||||
export = delay;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"yoctodelay-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -0,0 +1,4 @@
|
||||
import delay = require('yoctodelay'); // delay is(ms: number) => Promise<void>
|
||||
|
||||
// $ExpectType Promise<void>
|
||||
delay(4);
|
||||
Reference in New Issue
Block a user