I am currently working on making two separate http requests, each of which returns an observable<IProduct>
. My goal is to combine the results of these requests into a local object and then utilize the async pipe to display values from each.
productA$: observable<IProduct>;
productB$: observable<IProduct>;
combinedProds$: ?
this.productA$ = makeHttpRequest();
this.productB$ = makeHttpRequest();
this.combinedProds$ = combineLatest([
this.productA$,
this.productB$
])
.pipe(
map(([productA, productB]) =>
({ productA, productB}))
);
The current issue I am facing pertains to determining the appropriate type for combinedProds$
.