-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(ErrorObservable): remove type constraint to error value #2397
Conversation
src/observable/ErrorObservable.ts
Outdated
@@ -63,7 +63,7 @@ export class ErrorObservable<T> extends Observable<any> { | |||
subscriber.error(error); | |||
} | |||
|
|||
constructor(public error: T, private scheduler?: IScheduler) { | |||
constructor(public readonly error: any, private readonly scheduler?: IScheduler) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we've done similar (#2249) and we've accepted to introduce those changes, since it brings explicit clarification for TS users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either case I've updated code as it can be easily created as separate PR.
5acaafc
to
2f951cd
Compare
Hi guys, Change is easy but should not be this marked as BC ? @benlesh |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description:
This PR updates type signature of static creation method for
ErrorObservable
to no longer carry type constraint to value of error.Related issue (if exists):