the number of milliseconds to wait
Creates a Promise that resolves after ms milliseconds with a
value.
Resolve after 100ms
resolveAfterTimeout(100)
.then(() => console.log("then")) // will be called after 100ms
.catch(() => console.log("catch")); // this will never be called
Resolve after 100ms with "val"
resolveAfterTimeout(100, "val")
.then((val) => console.log(val)) // will be called after 100ms
.catch(() => console.log("catch")); // this will never be called
a Promise that resolves after ms milliseconds
the number of milliseconds to wait
Generated using TypeDoc
Creates a Promise that resolves after
msmilliseconds with avalue.Example
Resolve after 100ms
Example
Resolve after 100ms with
"val"Returns
a Promise that resolves after
msmilliseconds