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

fix(ErrorObservable): remove type constraint to error value #2397

Merged
merged 1 commit into from
Feb 21, 2017

Conversation

kwonoj
Copy link
Member

@kwonoj kwonoj commented Feb 21, 2017

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):

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.687% when pulling 5acaafc on kwonoj:fix-errorobservable-type into c81882f on ReactiveX:master.

@@ -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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not going to be a breaking change for some users? I feel like we've done this in the past, but I can't remember the verdict. @staltz? What are your thoughts?

For now, @kwonoj, can we exclude this change from this PR?

Copy link
Member Author

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.

Copy link
Member Author

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.

@coveralls
Copy link

coveralls commented Feb 21, 2017

Coverage Status

Coverage remained the same at 97.687% when pulling 5acaafc on kwonoj:fix-errorobservable-type into c81882f on ReactiveX:master.

@kwonoj kwonoj merged commit 9c72ee2 into ReactiveX:master Feb 21, 2017
@kwonoj kwonoj deleted the fix-errorobservable-type branch February 21, 2017 03:51
@rokerkony
Copy link

Hi guys,
after fresh npm install we have error as Type 'ErrorObservable' is not generic. with the code:
protected handleError (error: Response): ErrorObservable<string> {

Change is easy but should not be this marked as BC ? @benlesh

@lock
Copy link

lock bot commented Jun 6, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error Observable has incorrect signature
4 participants