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: forkJoin POJO signature should match only ObservableInput values #6095

Merged

Conversation

cartant
Copy link
Collaborator

@cartant cartant commented Mar 7, 2021

Description:

This PR tightens the forkJoin POJO signature so that only POJOs with ObservableInput values are matched. The implementation throws if the received POJO contains a value that is not an ObservableInput, so the types should reflect that.

As an aside, we should look at renaming some of our utility types, as the ObservableValueTuple type is mapped type that's not restricted to tuples. It could be used in this signature, too:

export function forkJoin<T extends Record<any, ObservableInput<any>>>(
  sourcesObject: T
): Observable<ObservableInputTuple<T>>;

But having Tuple in the type name makes no sense here. We can do this later, after v7, and can deprecate the old names (which have been exported).

Related issue (if exists): Nope

@cartant cartant requested a review from benlesh March 7, 2021 06:28
@benlesh benlesh merged commit 566427e into ReactiveX:master Mar 10, 2021
@cartant cartant deleted the cartant/fork-join-pojo-observable-input branch March 19, 2021 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants