Interface RetryOptions

Represents the options for retrying an operation

interface RetryOptions {
    abortSignal?: AbortSignal;
    attempts?: number;
    interrupt?: () => boolean;
    logger?: LoggerFunction;
    maxWaitTime?: number;
    timeout?: number;
    waitTime?: number;
}

Properties

abortSignal?: AbortSignal

The signal to be used to interrupt the retry process

attempts?: number

The maximum number of retry attempts.

interrupt?: () => boolean

A function that determines whether to interrupt the retry process Should return true to interrupt, false otherwise.

User abortSignal instead

The logger function used for logging retry attempts

maxWaitTime?: number

The maximum time to wait between retry attempts, in milliseconds

timeout?: number

Timeout for each try

waitTime?: number

The time to wait between retry attempts, in milliseconds