'of' vs 'from' operator

后端 未结 7 1990
栀梦
栀梦 2020-11-29 17:18

Is the only difference between Observable.of and Observable.from the arguments format? Like the Function.prototype.call and Func

相关标签:
7条回答
  • 2020-11-29 17:54
    1. from returns notification in chunks i.e. one by one. for eg: from("abcde") will return a => b => c => d => e
    2. of returns complete notification. for eg: of("abcde") will return abcde.

    https://stackblitz.com/edit/typescript-sckwsw?file=index.ts&devtoolsheight=100

    0 讨论(0)
提交回复
热议问题