Buffer values until other observable notify with emit
import { fromEvent, interval } from 'rxjs';
import { buffer } from 'rxjs/operators';
const interval$ = interval(1000);
const click$ = fromEvent(document, 'click');
const buffer$ = interval$.pipe(buffer(click$));
import { fromEvent, interval } from 'rxjs';
import { buffer } from 'rxjs/operators';
const interval$ = interval(500);
const interval2$ = interval(1000);
const buffer$ = interval$.pipe(buffer(interval2$));
Official Doc: rxjs.buffer