Skip to content

fix(partition): deprecate partition operator and create partition sta… - #4685

Merged
benlesh merged 1 commit into
ReactiveX:masterfrom
dkosasih:partition-fix
Apr 23, 2019
Merged

benlesh merged 1 commit into
ReactiveX:masterfrom
dkosasih:partition-fix

Conversation

@dkosasih

@dkosasih dkosasih commented Apr 4, 2019

Copy link
Copy Markdown
Contributor

Description:
Deprecate the current partition operator and create a new creation function partition observable.

Related issue (if exists):
#4419

@dkosasih

dkosasih commented Apr 4, 2019

Copy link
Copy Markdown
Contributor Author

I am still working on the tests.
if the partition code can be reviewed meanwhile, that would be awesome :)

* ```ts
* import { partition } from 'rxjs';
*
* const observableValues = of(1, 2, 3, 4, 5, 6);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing import for of.

*
* odds$.subscribe(x => console.log('odds', x));
* evens$.subscribe(x => console.log('evens', x));
* ```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It'd be nice to have the outputs of odds$ and evens$.

@benlesh benlesh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Will also need tests and dtslint tests.

Comment thread src/internal/observable/partition.ts Outdated
* with values that passed the predicate, and another with values that did not
* pass the predicate.
* @method partition
* @owner Observable

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@method and @owner can be removed. That's legacy from our old docs system.

@benlesh

benlesh commented Apr 4, 2019

Copy link
Copy Markdown
Member

(I can see it's draft, but it's looking good so far)

@dkosasih
dkosasih force-pushed the partition-fix branch 2 times, most recently from 2669cc7 to b2cbdac Compare April 11, 2019 05:03
@dkosasih
dkosasih marked this pull request as ready for review April 11, 2019 05:05
@dkosasih

Copy link
Copy Markdown
Contributor Author

It seems like there are few dtslint tests that are failing.
Looks like it's related to inference of {} has changed to unknown.
should this be in a separate issue @benlesh ?

@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 8349

  • 7 of 7 (100.0%) changed or added relevant lines in 2 files are covered.
  • 5 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.3%) to 96.941%

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 8343: 0.3%
Covered Lines: 5800
Relevant Lines: 5983

💛 - Coveralls

@benlesh
benlesh merged commit d5d6980 into ReactiveX:master Apr 23, 2019
BioPhoton pushed a commit to BioPhoton/rxjs that referenced this pull request May 15, 2019
@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