/** * Options for @see retryAction */ export interface IRetryActionOptions { /** maximum number of retries. * must be >= 0 */ maxRetries: number; /** optional custom values for delays between each retry */ delays?: number[]; /** the action to be (re)tried */ action: (attempt: number, lastError: any) => Promise; /** a callback that will allow a retry or not */ canRetry: (attempt: number, error: any) => Promise; } /** * a function that can retry a callback for maximum number of attempts, * waiting for a specific delay between each attempt, only if the * canRetry callback allows it. * @param options the options for the specifying the callback to retry and how. */ export declare function retryAction(options: IRetryActionOptions): Promise;