AbstractConstructs a new promise.
Optionalexecutor: (The executor function that is called immediately when the promise is constructed. It
is passed two functions, resolve and reject, that can be called to resolve or
reject the promise respectively.
Readonly[toReadonlycommunicatorThe communicator associated with the asynchronous operation.
ReadonlyoperationThe operation name.
ReadonlyproxyThe object proxy associated with the invocation.
Static Readonly[species]Cancels the asynchronous request.
Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
Optionalonfinally: () => voidThe callback to execute when the Promise is settled (fulfilled or rejected).
A Promise for the completion of the callback.
Whether the asynchronous request has completed.
true if the asynchronous request has completed, false otherwise.
Whether the asynchronous request has been sent.
true if the asynchronous request has been sent, false otherwise.
Rejects the promise with the specified reason.
The reason for rejecting the promise.
Whether the asynchronous request has been sent synchronously.
true if the asynchronous request has been sent synchronously, false otherwise.
Throws the exception if the asynchronous request was rejected with one; otherwise, does nothing.
StaticallCreates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
An array of Promises.
A new Promise.
StaticallCreates a Promise that is resolved with an array of results when all of the provided Promises resolve or reject.
An array of Promises.
A new Promise.
StaticdelayReturns a promise that is resolved after a specified delay.
The number of milliseconds to delay.
A promise that is resolved after the specified delay.
StaticraceStaticrejectCreates a new rejected promise for the provided reason.
Optionalreason: anyThe reason the promise was rejected.
A new rejected Promise.
StaticresolveCreates a new resolved promise.
A resolved promise.
The
AsyncResultclass encapsulates the state of an asynchronous invocation. It extends the Promise class. It provides additional methods to support canceling the operation.