Creates a new PortPromise instance.
The message port to use for resolving the promise.
The maximum time in milliseconds to wait for a message before rejecting the promise.
PrivatecurrentPrivatedebugA unique identifier for the promise.
PrivatemaxPeriodic update method for checking the message port. Resolves the promise when a message is received.
Optionaldelta: numberThe time delta since the last update.
Rejects the promise with the specified reason.
Optionalreason: anyThe reason for rejecting the promise.
Resolves the promise with the specified value.
Optionalvalue: TThe value to resolve the promise with.
StaticallReturns a promise that fulfills with an array of results when all input promises fulfill. Rejects if any one rejects.
An iterable (array) of promises or values.
A promise that resolves with an array of results, or rejects if any input rejects.
StaticallReturns a promise that fulfills with an array of objects describing the outcome of each input promise, regardless of whether they fulfilled or rejected.
An iterable (array) of promises or values.
A promise that always resolves with an array of settlement results.
StaticanyReturns a promise that fulfills with the first fulfilled input promise. Rejects with an AggregateError if all promises reject (or if the array is empty).
An iterable (array) of promises or values.
A promise that resolves with the first fulfilled value, or rejects if all reject.
StaticraceStaticrejectStaticresolveStaticwith
PortPromiseextendsHsPromiseand integrates with a message port for resolving promises. It implements theITickableinterface for periodic updates.