promise resolved value
If true, then the promise was aborted
Handler of the native promise rejection that was raised by a reason of abort
Handler of the native promise rejection
Handler of the native promise resolving
Number of pending child promises
Internal native promise instance
Actual promise state
Resolved promise value
True if the current promise is pending
Aborts the current promise (the promise will be rejected)
Executes a function with the specified parameters
arguments for the function
Attaches a handler for the promise' rejected state. The method returns a new promise that will be resolved with a value that returns from the passed handler.
Attaches a common callback for the promise fulfilled and rejected states. The method returns a new promise with the state and value from the current. A value from the passed callback will be ignored unless it equals a rejected promise or exception.
Attaches handlers for the promise fulfilled and/or rejected states. The method returns a new promise that will be resolved with a value that returns from the passed handlers.
Takes an iterable of promises and returns a single AbortablePromise that resolves to an array of the results of the input promises. This returned promise will resolve when all the input's promises have been resolved or if the input iterable contains no promises. It rejects immediately upon any of the input promises rejecting or non-promises throwing an error and will reject with this first rejection message/error.
Returns a promise that resolves after all the given promises have either been fulfilled or rejected, with an array of objects describing each promise's outcome.
It is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.
In comparison, the AbortablePromise returned by AbortablePromise.all()
may be more appropriate
if the tasks are dependent on each other / if you'd like to reject upon any of them reject immediately.
Returns an AbortablePromise object that is resolved with a given value.
If the value is a promise, that promise is returned; if the value is a thenable (i.e., has a "then" method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise, the returned promise will be fulfilled with the value.
This function flattens nested layers of promise-like objects (e.g., a promise that resolves to a promise that resolves to something) into a single layer.
Returns a new resolved AbortablePromise object with an undefined value
Returns an AbortablePromise object that is resolved with a given value. If the resolved value is a function, it will be invoked. The result of the invoking will be provided as a value of the promise.
If the value is a promise, that promise is returned; if the value is a thenable (i.e., has a "then" method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise, the returned promise will be fulfilled with the value.
This function flattens nested layers of promise-like objects (e.g., a promise that resolves to a promise that resolves to something) into a single layer.
Returns a new resolved AbortablePromise object with an undefined value
The method wraps the specified abort reason to ignore with tied promises, i.e., this reason won't reject all child promises
Class wraps promise-like objects and adds to them some extra functionality, such as possibility of cancellation, etc.