interface RetryerConfig { fn: () => TData | Promise; onFail?: (failureCount: number, error: TError) => void; onPause?: () => void; onContinue?: () => void; retry?: RetryValue; retryDelay?: RetryDelayValue; } export declare type RetryValue = boolean | number | ShouldRetryFunction; declare type ShouldRetryFunction = (failureCount: number, error: TError) => boolean; export declare type RetryDelayValue = number | RetryDelayFunction; declare type RetryDelayFunction = (failureCount: number) => number; interface Cancelable { cancel(): void; } export declare function isCancelable(value: any): value is Cancelable; export interface CancelOptions { revert?: boolean; silent?: boolean; } export declare class CancelledError { revert?: boolean; silent?: boolean; constructor(options?: CancelOptions); } export declare function isCancelledError(value: any): value is CancelledError; export declare class Retryer { cancel: (options?: CancelOptions) => void; cancelRetry: () => void; continue: () => void; failureCount: number; isPaused: boolean; isResolved: boolean; isTransportCancelable: boolean; promise: Promise; constructor(config: RetryerConfig); } export {};