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(never): Observable.never() Observable.empty() .ignoreElements () now return Observable<never> #2691
Conversation
src/observable/EmptyObservable.ts
Outdated
} | ||
|
||
static dispatch<T>(arg: DispatchArg<T>) { | ||
static dispatch(arg: DispatchArg<never>) { |
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.
wouldn't it better to make DispatchArg
as non-generic in line 6? (also making this fn to private and not export dispatcharg would be preferred)
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.
wasn't clear if DispatchArg was used elsewhere since it was exported, but certainly can 👍
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.
it will basically just mean I make subscriber: Subscriber<never>
instead of subscriber: Subscriber<T>
d6f40e2
to
49a339e
Compare
You should probably target the |
(I've changed base to |
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.
lgtm
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.
Guess some change comes by changing base 🤔 might need correct rebase.
ah, change itself LGTM |
@kwonoj issue is that next doesn't have everything from master yet, so my branch is bringing them along for the ride. i'm going to reset my branch to next and cherry pick it in, you all can upgrade |
…() now return Observable<never> fixes ReactiveX#2640 BREAKING CHANGE: Previously, `Observable.never()` `Observable.empty()` and the `.ignoreElements()` operator all returned `Observable<T>` which was incorrect since they actually never emit anything. Now they all return `Observable<never>` (`never` was added in TS 2.0 as a special type)
@kwonoj reset to |
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.
🚢
Need anything else for merge? |
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. |
fixes #2640
BREAKING CHANGE: Previously,
Observable.never()
Observable.empty()
and the
.ignoreElements()
operator all returnedObservable<T>
whichwas incorrect since they actually never emit anything. Now they all
return
Observable<never>
(never
was added in TS 2.0 as a specialtype)