How to get RxJS Observable events in zero time?
问题 I'm collecting all the events of an Observable to a data array: const obs$ = Rx.Observable .interval(500) .take(4); let data = []; const start = performance.now(); obs$.subscribe( value => { data.push({ time: performance.now() - start, data: value }); }, () => {}, () => { console.log(JSON.stringify(data, null, 2)); } ); <script src="https://unpkg.com/rxjs@5.2.0/bundles/Rx.js"></script> Is it possible to "foresee the future" and get the same data array without waiting 2 seconds ? To clarify, I