Trying to convert an
Observable<Array<ISource>>
to an Observable<ISource>
.
To accomplish this:
this.sources$ = this.store$
.select(fromRoot.getSourceEntities)
.map(sourceEntities => {
return sourceEntities
.filter((source:ISource) => source.id != null)
.map((source:ISource) => { return <ISource>{id: source.id}; });
})
.takeUntil(this.componentDestroyed$);
An error message is showing up:
Type 'Observable<ISource[]>' is not assignable to type 'Observable<ISource>'.
Any suggestions?