I have two observables. One that fetches the initial data, and another one that should react to changes and applay them accordingly:
const initial$: Observable<Report[]>;
const changes$: Observable<ObjectChangeEvent<Report>>;
Some characteristics are:
- initial$ has to complete first, before changes can be applied
- changes$ can emit 0..n times
- the changed array should be the basis for the next change emit. That means only the first change should apply to the initial State. Following changes should not discard previous ones.
I want to combine both observables into a single one. The closest I've come so far, is the combineLatest Operator. But it conflicts with characteristic 2), as changes$ may not emit anything.
Any help will be greatly appreciated.