【发布时间】:2018-04-22 06:16:48
【问题描述】:
我有一个非常基本的示例,它使用来自rxjs@5.5 的可让运算符map 和pipe:
import { map } from 'rxjs/operator/map';
let o = of(1, 2, 3, 4).pipe(
map((v) => v * 2)
);
但它会产生错误Error:(34, 5) TS2684:The 'this' context of type 'void' is not assignable to method's 'this' of type 'Observable<{}>'.这里有什么问题?
【问题讨论】:
标签: javascript typescript rxjs