/// /** * Resolve a promise with timeout * @param timeoutMs - Timeout in milliseconds * @param promise - Promise to be resolved or a function that returns a promise * @param failureMessage - Custom error message for timeout */ export declare function resolvePromiseWithTimeout(promise: Promise | (() => Promise), timeoutMs?: number, failureMessage?: string): Promise; /** * Sleep function */ export declare const sleep: typeof import("timers/promises").setTimeout; /** * Exponential backoff strategy for retries * @param base - Base wait time in milliseconds */ export declare function exponentialBackoff(base: number): (retries: number) => number; /** * Options for retry */ export type RetryOptions = { shouldRetry?: (err?: any, data?: T) => boolean; waitInMs?: number | ((retries: number) => number); maxRetries?: number; }; /** * Run a task with retry it if fails * @param fn - Task function * @param options - Retry options */ export declare function retryWithBackoff(fn: () => Promise, options?: RetryOptions): Promise;