Beta (still building)

window

window operator allows you split source observable to a different branch of observables

Example: window operator

import { interval, timer } from 'rxjs';
import { window, mergeAll, map, take } from 'rxjs/operators';

 const source$ = timer(0, 1000).pipe(take(20));
 const boundaries$ = interval(5000).pipe(take(4));
 const result$ = source$.pipe(window(boundaries$));

Example: window operator with mouse click

Each mouse clicks allow you to create a new observable branch

import { fromEvent, interval } from 'rxjs';
import { window, mergeAll, map, take } from 'rxjs/operators';

 const source$ = interval(1000);
 const click$ = fromEvent(document, 'click');
 const result$ = source$.pipe(window(click$));

Official Doc: rxjs.window