Bones/node_modules/rxjs/operator/retryWhen.d.ts

17 lines
976 B
TypeScript
Raw Normal View History

2017-05-17 13:45:25 -04:00
import { Observable } from '../Observable';
/**
* Returns an Observable that emits the same values as the source observable with the exception of an `error`.
* An `error` will cause the emission of the Throwable that cause the error to the Observable returned from
* notificationHandler. If that Observable calls onComplete or `error` then retry will call `complete` or `error`
* on the child subscription. Otherwise, this Observable will resubscribe to the source observable, on a particular
* Scheduler.
*
* <img src="./img/retryWhen.png" width="100%">
*
* @param {notificationHandler} receives an Observable of notifications with which a user can `complete` or `error`,
* aborting the retry.
* @param {scheduler} the Scheduler on which to subscribe to the source Observable.
* @returns {Observable} the source Observable modified with retry logic.
*/
export declare function retryWhen<T>(notifier: (errors: Observable<any>) => Observable<any>): Observable<T>;