-
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 TS definition of publish & multicast #2616
Conversation
…ector The TypeScript defintions for publish and multicast did not allow for changing the type
Currently working around like this... declare module "rxjs/operator/publish" {
export type selectors<T,R> = (source: Observable<T>) => Observable<R>;
export function publish<T,R>(this: Observable<T>, selector: selectors<T,R>): Observable<R>;
} |
Checks are failing due to some conflicts in the Travis <-> Github API communication after I fixed the commit message and force pushed... /cc @kwonoj |
I'm feeling this might be legit case of |
And second thought, isn't this PR causes breaking to existing consumers uses |
@kwonoj the following two types exist: export function publish<T>(this: Observable<T>): ConnectableObservable<T>;
export function publish<T, R>(this: Observable<T>, selector: selector<T, R>): Observable<R>; So:
|
I think this just needs refactored for v6 |
Ugh! Oh no! Am I closing 2 of @hermanbanken's PRs in one day? 😿 So sorry, @hermanbanken! 🙏 @cartant is right here, this work is already done. |
I’m just sad we didn’t get this in Rx 5 @benlesh, but since it’s in 6,
closing this is just fine 😉
Op do 31 mei 2018 om 20:34 schreef Ben Lesh <notifications@github.com>
… Closed #2616 <#2616>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2616 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAwSlX4Q_AT2PLQj8lv9cwJ7OSY7xzkpks5t4DelgaJpZM4Nm71l>
.
|
Description:
Change TS definition of publish & multicast to support selectors changing the type.
Related issue (if exists):
#1905