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

docs(groupBy): fix examples #4554

Merged
merged 1 commit into from Mar 7, 2019

Conversation

tanem
Copy link
Contributor

@tanem tanem commented Feb 10, 2019

Fixes a few glitches so the examples are runnable.

This also includes stripping the type definitions since the example code blocks specify javascript, and the other examples I've seen so far don't seem to include these.

@tanem
Copy link
Contributor Author

tanem commented Feb 10, 2019

Oops, just realised #4554 addresses some of these issues but not all. Happy to re-jig my changes with that other PR once it's merged, if that's easier.

@coveralls
Copy link

coveralls commented Feb 10, 2019

Pull Request Test Coverage Report for Build 8186

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.962%

Totals Coverage Status
Change from base Build 8181: 0.0%
Covered Lines: 5777
Relevant Lines: 5958

💛 - Coveralls

@niklas-wortmann
Copy link
Member

Unfortunately there are some merge conflicts in the meantime. @tanem could you resolve the conflicts?

@tanem
Copy link
Contributor Author

tanem commented Mar 1, 2019

Ah ok, no worries @jwo719, will get onto that ASAP 💯

@tanem
Copy link
Contributor Author

tanem commented Mar 1, 2019

Hey @jwo719, have resolved the merge conflicts 👍

* {id: 1, name: 'JavaScript'},
* {id: 2, name: 'Parcel'},
* {id: 2, name: 'webpack'},
* {id: 1, name: 'TypeScript'}
* {id: 1, name: 'TypeScript'},
* {id: 3, name: 'TSLint'}
* ).pipe(
* groupBy(p => p.id, p => p.name),
* mergeMap( (group$) => group$.pipe(reduce((acc, cur) => [...acc, cur], ["" + group$.key]))),
Copy link
Contributor

Choose a reason for hiding this comment

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

Not really part of the PR but I noticed this extra space mergeMap( (group$).... Can we get it removed?

And one more thing. Is there any reason why group$.key is send as a string and later parsed to an integer? If the string is required, does it make sense then to make it [`${group$.key}`] instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback @dzhavat, made both of those changes 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks better 👍

I'm actually not part of the RxJS team, so I commented more as a fellow contributor rather than someone who is responsible for reviewing the PR :)

Fixes a few glitches so the examples are runnable.

This also includes stripping the type definitions since the example
code blocks specify `javascript`, and the other examples I've seen so
far don't seem to include these.
@niklas-wortmann niklas-wortmann merged commit 21c2735 into ReactiveX:master Mar 7, 2019
@tanem tanem deleted the fix-group-by-examples branch March 7, 2019 16:08
@lock lock bot locked as resolved and limited conversation to collaborators Apr 6, 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.

None yet

4 participants