backoff-rxjs
Version:
A collection of helpful RxJS operators to deal with backoff strategies (like exponential backoff)
8 lines (7 loc) • 351 B
TypeScript
import { Observable, SchedulerLike } from 'rxjs';
export interface IntervalBackoffConfig {
initialInterval: number;
maxInterval?: number;
backoffDelay?: (iteration: number, initialInterval: number) => number;
}
export declare function intervalBackoff(config: number | IntervalBackoffConfig, scheduler?: SchedulerLike): Observable<number>;