We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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
caught must be optional so code like will work
catchError((err: Error) => { return throwError( () => err, ); })
No response
7.8.1
The text was updated successfully, but these errors were encountered:
I'm unable to reproduce this. It seems to work with the latest RxJS and TypeScript:
https://www.typescriptlang.org/play?noUnusedLocals=true&noUnusedParameters=true&useUnknownInCatchVariables=true&exactOptionalPropertyTypes=true#code/JYWwDg9gTgLgBAbzhAZgGjgYwIY0wCwFEopoMZ9SB3Y0qOAXzhVJDgHIoAPAKwGd2AbgCwAKDGoAFAEYMAJgwBmAJQA6MMDABTSWLj6suArWiTJWksrgBeAHyI9Bp1C0wArlAB2cCtRNQzKzs4CyhlEVEnBmUxZSA
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Type declaration of catchError has been changed and caught was marked as required
it breaks code where catchError receives only error as argument
Expected behavior
caught must be optional so code like will work
Reproduction code
No response
Reproduction URL
No response
Version
7.8.1
Environment
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: