Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with catchError #7450

Closed
NarHakobyan opened this issue Feb 29, 2024 · 1 comment
Closed

Issue with catchError #7450

NarHakobyan opened this issue Feb 29, 2024 · 1 comment

Comments

@NarHakobyan
Copy link

Describe the bug

Type declaration of catchError has been changed and caught was marked as required

export function catchError<T, O extends ObservableInput<any>>(
  selector: (err: any, caught: Observable<T>) => O
): OperatorFunction<T, T | ObservedValueOf<O>>;

it breaks code where catchError receives only error as argument

Expected behavior

caught must be optional so code like will work

catchError((err: Error) => {

            return throwError(
              () => err,
            );
          })

Reproduction code

No response

Reproduction URL

No response

Version

7.8.1

Environment

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants