Gets a Promise
that resolves after the specified time of delay.
non-negative time in milliseconds to wait before the returned Promise
resolves.
a token used to cancel the returned Promise
.
Gets a cancelled Promise
.
A cancelled Promise
is a Promise
rejected with PromiseCancelledError.
Gets a rejected Promise
.
This function behaves the same as Promise.reject
.
the rejection reason, or the Error
causing the rejection.
Gets a resolved Promise
.
This function behaves the same as Promise.resolve
.
the result of the resolved Promise
.
Returns a PromiseLike
instance that, when used with await
expression,
asynchronously yields back to the code below. The instance returned behaves
like the returned value of Promise.resolve()
.
Note: The major difference between yielded()
and delay(0)
, is that delay
will
resolve the returned Promise
in a setTimeout
callback, even if the delay time is 0
.
This will cause Promise
returned by delay
be resolved in marcoTask queue on some execution engine.
Generated using TypeDoc
Contains common utility functions for
Promise
.