Skip to content

Commit 1b69bd6

Browse files
authored
Revert "refactor(catchError): add type overloads for functions that do not return (#3421)" (#3425)
This reverts commit b1e5d3a.
1 parent 9244089 commit 1b69bd6

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/internal/operators/catchError.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,7 @@ import { Observable } from '../Observable';
44

55
import { OuterSubscriber } from '../OuterSubscriber';
66
import { subscribeToResult } from '../util/subscribeToResult';
7-
import { ObservableInput, OperatorFunction, MonoTypeOperatorFunction } from '../types';
8-
9-
export function catchError<T>(
10-
selector: (err: any, caught: Observable<T>) => never
11-
): MonoTypeOperatorFunction<T>;
12-
13-
export function catchError<T>(
14-
selector: (err: any, caught: Observable<T>) => ObservableInput<T>
15-
): MonoTypeOperatorFunction<T>;
16-
17-
export function catchError<T, R>(
18-
selector: (err: any, caught: Observable<T>) => ObservableInput<R>
19-
): OperatorFunction<T, R>;
7+
import { ObservableInput, OperatorFunction } from '../types';
208

219
/**
2210
* Catches errors on the observable to be handled by returning a new observable or throwing an error.
@@ -75,7 +63,7 @@ export function catchError<T, R>(
7563
* catch `selector` function.
7664
* @name catchError
7765
*/
78-
export function catchError<T, R>(selector: (err: any, caught: Observable<T>) => ObservableInput<R>|never): OperatorFunction<T, T | R> {
66+
export function catchError<T, R>(selector: (err: any, caught: Observable<T>) => ObservableInput<R>): OperatorFunction<T, T | R> {
7967
return function catchErrorOperatorFunction(source: Observable<T>): Observable<T | R> {
8068
const operator = new CatchOperator(selector);
8169
const caught = source.lift(operator);

0 commit comments

Comments
 (0)