import { CancelOptions } from './types'; interface RetryerConfig { fn: () => TData | Promise; abort?: () => void; onError?: (error: TError) => void; onSuccess?: (data: TData) => void; 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, error: TError) => number; interface Cancelable { cancel(): void; } export declare function isCancelable(value: any): value is Cancelable; 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; continueRetry: () => void; continue: () => void; failureCount: number; isPaused: boolean; isResolved: boolean; isTransportCancelable: boolean; promise: Promise; private abort?; constructor(config: RetryerConfig); } export {};