The resolved type of the factory's promises.
Defaults to any
.
The rejected type of the factory's promises.
Defaults to any
.
An optional type to extend the phases supported by a poll.
Defaults to standby
, which already exists in the Phase
type.
A promise factory that returns an individual poll request.
Indicates when the poll switches to standby.
The name of the poll.
An interval value that indicates the poll should tick immediately.
Delays are 32-bit integers in many browsers so intervals need to be capped.
An interval value that indicates the poll should never tick.
A signal emitted when the poll is disposed.
Whether the poll is disposed.
The poll state, which is the content of the current poll tick.
A promise that resolves when the poll next ticks.
A signal emitted when the poll ticks and fires off a new request.
Execute a new poll factory promise or stand by if necessary.
Dispose the poll.
Refreshes the poll. Schedules refreshed
tick if necessary.
A promise that resolves after tick is scheduled and never rejects.
The returned promise resolves after the tick is scheduled, but before
the polling action is run. To wait until after the poll action executes,
await the poll.tick
promise: await poll.refresh(); await poll.tick;
Schedule the next poll tick.
The next poll state data to schedule. Defaults to standby.
A promise that resolves when the next poll state is active.
This method is not meant to be invoked by user code typically. It is public to allow poll instances to be composed into classes that schedule ticks.
Starts the poll. Schedules started
tick if necessary.
A promise that resolves after tick is scheduled and never rejects.
Stops the poll. Schedules stopped
tick if necessary.
A promise that resolves after tick is scheduled and never rejects.
Generated using TypeDoc
A class that wraps an asynchronous function to poll at a regular interval with exponential increases to the interval length if the poll fails. A namespace for
Poll
types, interfaces, and statics.