Creates Promise instances with "cancel" function.
function defined as (resolve,reject,onCancelled)=> {}
StaticallCreates promise which fulfills if all other promises are fulfilled. Or rejects if one of the promises rejects.
Iterable of Promise instances
StaticallCreates a promise that resolves after all of the given promises have either fulfilled or rejected, with an array of objects that each describes the outcome of each promise.
StaticanyPromise.any() takes an iterable of Promise objects and, as soon as one of the promises in the iterable fulfills, returns a single promise that resolves with the value from that promise. If no promises in the iterable fulfill (if all of the given promises are rejected), then the returned promise is rejected with an AggregateError, Essentially, this method is the opposite of Promise.all().
StaticcancelableCreates CancelablePromise around the given promise.
base promise.
a cancelable promise
StaticisThis method tests if a given object is a promise. The algorithm will return true for:
Note: Because of support for dojo/Deferred any object with a 'then', 'isResolved' and 'isRejected' method is detected as a promise.
a potential promise.
true if candidate is a promise.
StaticraceCreates promise which fulfills if one of the other promises fulfills. Or rejects if one of the promises rejects.
Iterable of Promise instances
Creates promise which fulfills if one of the other promises fulfills. Or rejects if one of the promises rejects.
StaticrejectOptionalreason: anyThe reason the promise was rejected.
a promise in rejected state.
StaticresolveCreates a new resolved promise
Creates a new resolved promise with the given value
result object.
a promise in fulfilled state.
StatictrackAugments the given Promise with new state lookup functions.
StaticwithProduces an object with a promise along with its resolution and rejection functions. Allows to resolve/reject the promise manually after creating it.
StaticwrapWraps e.g. dojo/Deferred or native Promise to this Promise class.
a promise
Registers an error handler.
Registers an error handler. Which is not called if the error is a Cancel instance.
Registers a handler, which is called in success or error state. But the handler is not able to change the result state!
Optionalhandler: null | () => voidfunction invoked regardless of success or error
Registers success and/or error handlers.
this instance, augmented with augmented with:
Promise class which provides a 'cancel' method. Read more about Promises.