partition operator split the observable to Two new observables. ⚠️ always return 2 new operators
import { of, partition, interval } from 'rxjs';
const interval$ = interval(2000);
const [part1$, part2$] = partition(interval$, i => i % 2);
import { of, partition, interval } from 'rxjs';
const interval$ = interval(2000);
const [part1$, part2$, part3$] = partition(interval$, i => i % 3);
Official Doc: rxjs.partition