/** * E2E Test Runner - Retry Utility */ export interface RetryOptions { /** Maximum number of attempts (1 = no retry) */ maxAttempts: number; /** Base delay between retries in milliseconds */ baseDelay: number; /** Maximum delay between retries in milliseconds */ maxDelay: number; /** Whether to use exponential backoff */ exponentialBackoff: boolean; /** Jitter factor (0-1) to randomize delays */ jitterFactor: number; /** Optional function to determine if error is retryable */ shouldRetry?: (error: Error, attempt: number) => boolean; /** Optional callback before each retry */ onRetry?: (error: Error, attempt: number, delay: number) => void; } export declare const DEFAULT_RETRY_OPTIONS: RetryOptions; /** * Execute a function with retry logic */ export declare function withRetry(fn: () => Promise, options?: Partial): Promise; /** * Calculate delay for a retry attempt */ export declare function calculateDelay(attempt: number, options: RetryOptions): number; /** * Sleep for a specified duration */ export declare function sleep(ms: number): Promise; /** * Execute a function with a timeout */ export declare function withTimeout(fn: () => Promise, timeoutMs: number, operation?: string): Promise; /** * Execute a function with both retry and timeout */ export declare function withRetryAndTimeout(fn: () => Promise, options?: Partial & { timeout?: number; operation?: string; }): Promise; /** * Create a retry wrapper with preset options */ export declare function createRetryWrapper(presetOptions: Partial): (fn: () => Promise, options?: Partial) => Promise; /** * Measure execution duration */ export declare function measureDuration(fn: () => Promise): Promise<{ result: T; duration: number; }>; /** * Poll until a condition is met */ export declare function pollUntil(fn: () => Promise, condition: (result: T) => boolean, options?: { interval?: number; timeout?: number; operation?: string; }): Promise; //# sourceMappingURL=retry.d.ts.map