UNPKG

askui

Version:

Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on

20 lines (19 loc) 767 B
import { RetryStrategy } from './retry-strategy'; /** * LinearRetryStrategy implements a retry strategy that uses a linear backoff algorithm. */ export declare class LinearRetryStrategy implements RetryStrategy { baseDelayMs: number; retryCount: number; /** * @param baseDelayMs - The initial delay before the first retry (default is 1000ms) * @param retryCount - The maximum number of retries (default is 3) */ constructor(baseDelayMs?: number, retryCount?: number); /** * Calculates the delay for a given retry attempt using linear backoff. * @param attempt - The current retry attempt number (1-based) * @returns The delay in milliseconds for the current attempt */ getDelay(attempt: number): number; }