RxJS from运算符如何创建在数组中发出多个条目的源?

时间:2018-10-29 11:23:36

标签: javascript typescript rxjs

this example from the learn RxJS documentation

const source = from(people);

创建一个发射每个人的源。我添加了typing to the source in a Stackblitz example,可以按以下方式键入来源:

source:Observable<Person>

因此,看起来来源是一个单身实例的Observable。但是,它将发出Person的多个实例。这是如何运作的?换句话说,如果我只读source类型,我希望该来源是Observable,它只会发出一个人。

0 个答案:

没有答案