I am looking for an operator that would help me pace the results emitted from an observable, it would look like this :
[--A-BC--D-E----------------]
[--A----B----C----D----E----]
I tried AuditTime() but it does not replay the results that was emitted between intervals, it does something like this :
[--A-BC--D-E----------------]
[--A----C----E--------------]
Thanks for your help.
I think this should do what you need:
The trick here is that I'm using
concatMap
to always wait until the previous Observable completes. The inner Observable emits the value and then postpones its own completion and thusconcatMap
enforces the delay between two emissions.See live demo: https://stackblitz.com/edit/rxjs6-test-scheduler?file=index.ts