summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/rxjs/internal/operators/catchError.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/rxjs/internal/operators/catchError.d.ts')
-rw-r--r--tools/node_modules/eslint/node_modules/rxjs/internal/operators/catchError.d.ts72
1 files changed, 2 insertions, 70 deletions
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/catchError.d.ts b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/catchError.d.ts
index 76862b0bb7..3c4759bb3b 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/catchError.d.ts
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/catchError.d.ts
@@ -1,71 +1,3 @@
import { Observable } from '../Observable';
-import { ObservableInput, OperatorFunction, MonoTypeOperatorFunction } from '../types';
-/**
- * Catches errors on the observable to be handled by returning a new observable or throwing an error.
- *
- * ![](catch.png)
- *
- * ## Examples
- * Continues with a different Observable when there's an error
- *
- * ```javascript
- * of(1, 2, 3, 4, 5).pipe(
- * map(n => {
- * if (n == 4) {
- * throw 'four!';
- * }
- * return n;
- * }),
- * catchError(err => of('I', 'II', 'III', 'IV', 'V')),
- * )
- * .subscribe(x => console.log(x));
- * // 1, 2, 3, I, II, III, IV, V
- * ```
- *
- * Retries the caught source Observable again in case of error, similar to retry() operator
- *
- * ```javascript
- * of(1, 2, 3, 4, 5).pipe(
- * map(n => {
- * if (n === 4) {
- * throw 'four!';
- * }
- * return n;
- * }),
- * catchError((err, caught) => caught),
- * take(30),
- * )
- * .subscribe(x => console.log(x));
- * // 1, 2, 3, 1, 2, 3, ...
- * ```
- *
- * Throws a new error when the source Observable throws an error
- *
- * ```javascript
- * of(1, 2, 3, 4, 5).pipe(
- * map(n => {
- * if (n == 4) {
- * throw 'four!';
- * }
- * return n;
- * }),
- * catchError(err => {
- * throw 'error in source. Details: ' + err;
- * }),
- * )
- * .subscribe(
- * x => console.log(x),
- * err => console.log(err)
- * );
- * // 1, 2, 3, error in source. Details: four!
- * ```
- *
- * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which
- * is the source observable, in case you'd like to "retry" that observable by returning it again. Whatever observable
- * is returned by the `selector` will be used to continue the observable chain.
- * @return {Observable} An observable that originates from either the source or the observable returned by the
- * catch `selector` function.
- * @name catchError
- */
-export declare function catchError<T>(selector: (err: any, caught: Observable<T>) => never): MonoTypeOperatorFunction<T>;
-export declare function catchError<T, R>(selector: (err: any, caught: Observable<T>) => ObservableInput<R>): OperatorFunction<T, T | R>;
+import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
+export declare function catchError<T, O extends ObservableInput<any>>(selector: (err: any, caught: Observable<T>) => O): OperatorFunction<T, T | ObservedValueOf<O>>;