0

我试图弄清楚 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.
});

最好的,埃吉尔。

4

1 回答 1

1

看来我自己想出来了:)

combineLatest实例函数正是我需要的。

于 2013-04-24T12:41:05.833 回答