import { type UnrecoverableError } from "./errors";
export type RetryConfig
= Promise> = {
fn: (...args: P) => R;
fnName?: string;
maxRetries: number;
waitBetweenMs?: number;
logger?: (message: string) => void;
backOff?: {
backOffBase: number;
};
};
export declare const isErrorUnrecoverable: (err: Error) => err is UnrecoverableError;
export declare class UnrecoverableAggregateError extends AggregateError {
unrecoverable?: boolean;
}
export declare function retry>(config: RetryConfig
): (...args: P) => Promise>;
export declare function executeWithRetries>(config: RetryConfig
, args: P): Promise;
export declare const waitForSuccess: (cond: (iterationIndex?: number) => Promise, count: number, errorMessage: string, sleepTimeMs?: number, description?: string) => Promise;
//# sourceMappingURL=retry.d.ts.map