import { LoggerOption } from '@technical-1/core'; interface RetryOptions extends LoggerOption { /** Number of retries after the initial attempt. Default 3. */ retries?: number; /** Base delay in ms before the first retry. Default 200. */ minDelayMs?: number; /** Maximum delay in ms between retries. Default 5000. */ maxDelayMs?: number; /** Exponential growth factor. Default 2. */ factor?: number; /** Apply random jitter in [0, delay). Default true. */ jitter?: boolean; /** Cancellation signal; aborts pending waits and prevents further attempts. */ signal?: AbortSignal; /** * Decide whether a thrown error is retryable. Default: cross-realm-safe * property check (`err.retryable === true`) per the @technical-1/core * contract — intentionally NOT an `instanceof` check. */ isRetryable?: (err: unknown) => boolean; } /** * Run `fn(attempt)` (attempt is 1-based) with exponential backoff. Retries * only retryable errors while attempts remain; otherwise rethrows the error. */ declare function withRetry(fn: (attempt: number) => Promise, opts?: RetryOptions): Promise; export { type RetryOptions, withRetry };