UNPKG

retryable-document-client

Version:
17 lines (16 loc) 447 B
export interface StrategyOptions { exceptions: string[]; maxAttempts?: number; handleErr?: (err: any) => void; } export interface CalculateTimeout { (attempt: number): number; } export interface Strategy { (err: any, attempt: number, cback: (err?: any) => void): void; } interface Factory { (calculateTimeout: CalculateTimeout, options: StrategyOptions): Strategy; } declare const factory: Factory; export default factory;