pairwise
operator groups current value with before value and emit a array with both values
import { interval } from 'rxjs';
import { pairwise } from 'rxjs/operators';
const source$ = interval(1500);
const result$ = source$.pipe(pairwise());
Official Doc: rxjs.pairwise