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(windowWhen): fix example #4548

Merged
merged 1 commit into from Feb 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/internal/operators/windowWhen.ts
Expand Up @@ -28,13 +28,13 @@ import { OperatorFunction } from '../types';
* Emit only the first two clicks events in every window of [1-5] random seconds
* ```javascript
* import { fromEvent, interval } from 'rxjs';
* import { windowWhen, map, mergeAll } from 'rxjs/operators';
* import { windowWhen, map, mergeAll, take } from 'rxjs/operators';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(
* windowWhen(() => interval(1000 + Math.random() * 4000)),
* map(win => win.pipe(take(2))), // each window has at most 2 emissions
* mergeAll(), // flatten the Observable-of-Observables
* mergeAll() // flatten the Observable-of-Observables
* );
* result.subscribe(x => console.log(x));
* ```
Expand Down