0
我创造了这个Observable
:RxJs:映射到匿名类型的对象
private accounts$: Observable<{type: string, alias: string}>;
我需要一个Array<Account>
映射到{type, alias}
对象的流。到目前为止,我试过这个:
this.accounts$ = this.store$
.select(fromRoot.getDBoxAccountEntities)
.flatMap(accounts => accounts.map(account => {type: 'dbox', alias: account.dboxAccount}))
...
但是我收到编译错误消息。
任何想法?