Fix TS definition of publish & multicast#2616
Closed
hermanbanken wants to merge 1 commit intoReactiveX:masterfrom
Closed
Fix TS definition of publish & multicast#2616hermanbanken wants to merge 1 commit intoReactiveX:masterfrom
hermanbanken wants to merge 1 commit intoReactiveX:masterfrom
Conversation
…ector The TypeScript defintions for publish and multicast did not allow for changing the type
Contributor
Author
|
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>;
} |
Contributor
Author
|
Checks are failing due to some conflicts in the Travis <-> Github API communication after I fixed the commit message and force pushed... /cc @kwonoj |
Member
|
I'm feeling this might be legit case of |
Member
|
And second thought, isn't this PR causes breaking to existing consumers uses |
Contributor
Author
|
@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:
|
Member
|
I think this just needs refactored for v6 |
Collaborator
Member
|
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. |
Contributor
Author
|
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 <[email protected]>
… 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>
.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Change TS definition of publish & multicast to support selectors changing the type.
Related issue (if exists):
#1905