Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.

docs(operators): add documentation for windowToggle #246

Merged
merged 10 commits into from
Mar 8, 2018
Merged

docs(operators): add documentation for windowToggle #246

merged 10 commits into from
Mar 8, 2018

Conversation

hardikpthv
Copy link
Contributor

Close #126

@codecov-io
Copy link

codecov-io commented Jan 27, 2018

Codecov Report

Merging #246 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #246   +/-   ##
=======================================
  Coverage   90.49%   90.49%           
=======================================
  Files         115      115           
  Lines         442      442           
  Branches       10       10           
=======================================
  Hits          400      400           
  Misses         40       40           
  Partials        2        2
Impacted Files Coverage Δ
src/operator-docs/transformation/windowToggle.ts 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18e88d2...2669f73. Read the comment docs.

name: 'windowToggle',
operatorType: 'transformation',
signature:
'public windowToggle(openings: Observable<O>, closingSelector: function(value: O): Observable): Observable<Observable<T>>',
Copy link
Contributor

Choose a reason for hiding this comment

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

In contrast with the old documentation, we don't want any "generics" in the method signature as per #196. So please remove the generics.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, will do it

i % 2 ? Rx.Observable.interval(500) : Rx.Observable.empty()
).mergeAll();
result.subscribe(x => console.log(x));
`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Add some expected console output as a comment below the subscription in the code. Also add it in the jsbin example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it.

Copy link
Member

@niklas-wortmann niklas-wortmann left a comment

Choose a reason for hiding this comment

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

Rest looks pretty good to me. Good Job !!!

parameters: [
{
name: 'openings',
type: 'Observable<O>',
Copy link
Member

@niklas-wortmann niklas-wortmann Feb 5, 2018

Choose a reason for hiding this comment

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

maybe remove this generic. Could be confusing?!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm, will remove it.


const clicks = fromEvent(document, 'click');
const openings = interval(1000);
const result = clicks.windowToggle(openings, i =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be using .pipe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, will do it.

Copy link
Member

@niklas-wortmann niklas-wortmann left a comment

Choose a reason for hiding this comment

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

LGTM

@sumitarora sumitarora merged commit 192a02b into ReactiveX:master Mar 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants