我想弄清楚RxJS中是否有任何现有的运算符可以使用以下内容,或者我是否需要滚动自己的扩展名:
var x = // some observable sequence
var y = // some observable sequence
var z = // some observable sequence
// 'when' should only call onNext when all of x, y and z has returned at
// least one value. After that, 'when' should continue to call onNext if
// any of x, y, z changes their value.
var w = Rx.Observable.when(x, y, z).select(function(x, y, z) {
// do stuff values of from z, y, x.
});
Best,Egil。
答案 0 :(得分:1)
看起来我自己想出来了:)
combineLatest
实例函数完全符合我的需要。