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

feat(forkJoin): accepts a dictionary of sources #4640

Merged
merged 1 commit into from
Apr 23, 2019

Conversation

benlesh
Copy link
Member

@benlesh benlesh commented Mar 15, 2019

  • Adds forkJoin({ foo, bar }) such that it will return an Observable<{ foo, bar }> containing the values emitted from the sources held at the properties of the passed object.
  • DEPRECATED: forkJoin(a, b, c, d) should no longer be used, rather, just pass an array such as forkJoin([a, b, c, d]).
  • Reduces the size of the fork join code a bit
    Been wanting to do this one for a while. Going to try to get combineLatest also. (Inspired to get to it by @cartant ❤️)

@rxjs-bot
Copy link

Warnings
⚠️

❗ Big PR (1)

(1) : Pull Request size seems relatively large. If Pull Request contains multiple changes, split each into separate PR will helps faster, easier review.

Generated by 🚫 dangerJS

@coveralls
Copy link

coveralls commented Mar 15, 2019

Pull Request Test Coverage Report for Build 8383

  • 39 of 39 (100.0%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.2%) to 96.88%

Files with Coverage Reduction New Missed Lines %
src/internal/observable/fromPromise.ts 1 87.5%
src/internal/observable/fromIterable.ts 2 95.24%
src/internal/observable/fromObservable.ts 2 83.33%
Totals Coverage Status
Change from base Build 8381: 0.2%
Covered Lines: 5807
Relevant Lines: 5994

💛 - Coveralls

benlesh added a commit to benlesh/rxjs that referenced this pull request Mar 15, 2019
This PR deprecates all `combineLatest` signatures except `combineLatest([a, b, c])`, in order to make `combineLatest` smaller in an upcoming version, and in order for `combineLatest` to ever accept a dictionary of observables (and emit a dictionary of values), these extra functionsignatures need to be deprecated ahead of time to signal their future removal.

related ReactiveX#4640
Copy link
Collaborator

@cartant cartant left a comment

Choose a reason for hiding this comment

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

LGTM. Just some minor issues with test descriptions.

spec/observables/forkJoin-spec.ts Show resolved Hide resolved
spec/observables/forkJoin-spec.ts Show resolved Hide resolved
benlesh added a commit that referenced this pull request Mar 19, 2019
#4641)

This PR deprecates all `combineLatest` signatures except `combineLatest([a, b, c])`, in order to make `combineLatest` smaller in an upcoming version, and in order for `combineLatest` to ever accept a dictionary of observables (and emit a dictionary of values), these extra functionsignatures need to be deprecated ahead of time to signal their future removal.

related #4640
- Adds `forkJoin({ foo, bar })` such that it will return an `Observable<{ foo, bar }>` containing the values emitted from the sources held at the properties of the passed object.
- DEPRECATED: `forkJoin(a, b, c, d)` should no longer be used, rather, just pass an array such as `forkJoin([a, b, c, d])`.
@benlesh benlesh merged commit b5a2ac9 into ReactiveX:master Apr 23, 2019
BioPhoton pushed a commit to BioPhoton/rxjs that referenced this pull request May 15, 2019
ReactiveX#4641)

This PR deprecates all `combineLatest` signatures except `combineLatest([a, b, c])`, in order to make `combineLatest` smaller in an upcoming version, and in order for `combineLatest` to ever accept a dictionary of observables (and emit a dictionary of values), these extra functionsignatures need to be deprecated ahead of time to signal their future removal.

related ReactiveX#4640
BioPhoton pushed a commit to BioPhoton/rxjs that referenced this pull request May 15, 2019
- Adds `forkJoin({ foo, bar })` such that it will return an `Observable<{ foo, bar }>` containing the values emitted from the sources held at the properties of the passed object.
- DEPRECATED: `forkJoin(a, b, c, d)` should no longer be used, rather, just pass an array such as `forkJoin([a, b, c, d])`.
@lock lock bot locked as resolved and limited conversation to collaborators May 23, 2019
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.

4 participants