Skip to main content

Interface: PollOptions

Defined in: async/types.ts:57

Options for polling operations.

Properties

interval?

readonly optional interval: number

Defined in: async/types.ts:62

Interval between poll attempts in milliseconds.

Default

1000

maxAttempts?

readonly optional maxAttempts: number

Defined in: async/types.ts:68

Maximum number of poll attempts.

Default

10

onPoll()?

readonly optional onPoll: (attempt) => void

Defined in: async/types.ts:84

Callback invoked on each poll attempt.

Parameters

attempt

number

Returns

void


shouldContinue()?

readonly optional shouldContinue: (attempt) => boolean

Defined in: async/types.ts:79

Predicate to determine if polling should stop. Return true to continue polling, false to stop.

Parameters

attempt

number

Returns

boolean


timeout?

readonly optional timeout: number

Defined in: async/types.ts:73

Timeout in milliseconds for the entire polling operation.