@botonic/plugin-contentful
Version:
## What Does This Plugin Do?
12 lines (11 loc) • 445 B
TypeScript
export declare function sleep(ms: number): Promise<void>;
export interface Backoff {
backoff(): Promise<void>;
}
export declare class ExponentialBackoff implements Backoff {
private startMs;
private times;
constructor(startMs?: number, times?: number);
backoff(): Promise<void>;
}
export declare function repeatWithBackoff<T>(func: () => Promise<T>, backoff?: ExponentialBackoff, logger?: (msg: string) => void): Promise<T>;