type of the promise resolution result.
Gets the derived PromiseLike
controlled by the current instance.
Synchronously cancels the derived PromiseLike
.
true
if the derived PromiseLike
has just been rejected with PromiseCancelledError
;
otherwise it means the PromiseLike
has already been settled before.
Synchronously rejects the derived PromiseLike
with the specified rason.
the rejection reason, or the Error
causing the rejection.
true
if the derived PromiseLike
has just been rejected;
otherwise it means the PromiseLike
has already been settled before.
Synchronously resolves the derived PromiseLike
with the specified result.
the resolution result, or a PromiseLike
that can be further resolved.
true
if the derived PromiseLike
has just been resolved;
otherwise it means the PromiseLike
has already been settled before.
Generated using TypeDoc
Resolves or rejects a
PromiseLike
from outside of it.This class is significantly different from PromiseResolutionSource in the way that it ensures when tryResolve, tryCancel, or tryReject is called, the continuation callbacks associated with
PromiseLike
are executed synchronously. However, downstream consumers are still able to let their continuation callbacks execute asynchronously. See IConfigurablePromiseLike for more information.This class is similar to
Deferred
but it explicitly separates the promise and its control side into two different objects.