You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
469 B
TypeScript
13 lines
469 B
TypeScript
8 months ago
|
export declare type JitterType = "none" | "full";
|
||
|
export declare type BackoffOptions = Partial<IBackOffOptions>;
|
||
|
export interface IBackOffOptions {
|
||
|
delayFirstAttempt: boolean;
|
||
|
jitter: JitterType;
|
||
|
maxDelay: number;
|
||
|
numOfAttempts: number;
|
||
|
retry: (e: any, attemptNumber: number) => boolean | Promise<boolean>;
|
||
|
startingDelay: number;
|
||
|
timeMultiple: number;
|
||
|
}
|
||
|
export declare function getSanitizedOptions(options: BackoffOptions): IBackOffOptions;
|