MCPcopy Index your code
hub / github.com/angular/angular / genericRetryStrategy

Function genericRetryStrategy

packages/zone.js/test/rxjs/rxjs.retry.spec.ts:13–24  ·  view source on GitHub ↗
(finalizer: () => void)

Source from the content-addressed store, hash-verified

11describe('retryWhen', () => {
12 let log: any[];
13 const genericRetryStrategy = (finalizer: () => void) => (attempts: Observable<any>) =>
14 attempts.pipe(
15 mergeMap((error, i) => {
16 const retryAttempt = i + 1;
17 if (retryAttempt > 3) {
18 return throwError(error);
19 }
20 log.push(error);
21 return timer(retryAttempt * 1);
22 }),
23 finalize(() => finalizer()),
24 );
25
26 const errorGenerator = () => {
27 return throwError(new Error('error emit'));

Callers 1

rxjs.retry.spec.tsFile · 0.85

Calls 3

timerFunction · 0.85
throwErrorFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…