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.
PrivatecurrentA 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.
PortPromiseextendsHsPromiseand integrates with a message port for resolving promises. It implements theITickableinterface for periodic updates.