UNPKG

803 BTypeScriptView Raw
1import { DelayFunction } from '../types';
2export declare class NonRetryableError extends Error {
3 readonly nonRetryable = true;
4 constructor(message: string);
5}
6export declare const isNonRetryableError: (obj: any) => obj is NonRetryableError;
7/**
8 * @private
9 * Internal use of Amplify only
10 */
11export declare function retry<T>(functionToRetry: (...args: any[]) => T, args: any[], delayFn: DelayFunction, onTerminate?: Promise<void>): Promise<T>;
12/**
13 * @private
14 * Internal use of Amplify only
15 */
16export declare function jitteredBackoff(maxDelayMs?: number): DelayFunction;
17/**
18 * @private
19 * Internal use of Amplify only
20 */
21export declare const jitteredExponentialRetry: <T>(functionToRetry: (...args: any[]) => T, args: any[], maxDelayMs?: number, onTerminate?: Promise<void>) => Promise<T>;