Skip to content

TimeoutOptions

Defined in: src/timeout.ts:9

optional cooperative?: boolean

Defined in: src/timeout.ts:19

false (default): give up as soon as the time is up, even if the callback ignores the signal. true: abort the signal, then wait for the callback to finish (Polly v8 behaviour), so no work outlives the timeout.


optional keepLateResult?: boolean

Defined in: src/timeout.ts:21

With cooperative: if the callback still succeeds after the deadline, return its result instead of the timeout error.


optional name?: string

Defined in: src/timeout.ts:10


optional onTimeout?: (args) => MaybePromise<void>

Defined in: src/timeout.ts:14

OnTimeoutArgs

MaybePromise<void>


optional timeout?: Duration

Defined in: src/timeout.ts:12

Default 30 s. Infinity disables the timeout.


optional timeoutGenerator?: (args) => MaybePromise<Duration>

Defined in: src/timeout.ts:13

ResilienceContext

MaybePromise<Duration>