From 23ea550cf5eecfda74dac0a94bc943b989d55ff4 Mon Sep 17 00:00:00 2001 From: Tane Morgan Date: Sun, 10 Feb 2019 06:04:19 +1300 Subject: [PATCH] docs(windowWhen): fix example --- src/internal/operators/windowWhen.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/operators/windowWhen.ts b/src/internal/operators/windowWhen.ts index 556c6b258a..9ae7186b37 100644 --- a/src/internal/operators/windowWhen.ts +++ b/src/internal/operators/windowWhen.ts @@ -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)); * ```