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.
Private
currentA unique identifier for the promise.
Private
maxPeriodic update method for checking the message port. Resolves the promise when a message is received.
Optional
delta: numberThe time delta since the last update.
Rejects the promise with the specified reason.
Optional
reason: anyThe reason for rejecting the promise.
Resolves the promise with the specified value.
Optional
value: TThe value to resolve the promise with.
PortPromise
extendsHsPromise
and integrates with a message port for resolving promises. It implements theITickable
interface for periodic updates.