buffer value until X time
import { interval } from 'rxjs';
import { bufferTime } from 'rxjs/operators';
const interval$ = interval(1000);
const buffer$ = interval$.pipe(bufferTime(2000));
import { fromEvent } from 'rxjs';
import { bufferTime } from 'rxjs/operators';
const click$ = fromEvent(document, 'click');
const buffer$ = click$.pipe(bufferTime(2000));
Official Doc: rxjs.bufferTime