1
私は観測値から値を受け取り、観測値を返す2つの関数に値をパイプする方法が必要です(単一の値を出してから終了する)。私は.combineLatest()
が私に投影関数を渡すことを望んでいましたが、そうではありません。RxJS5:投影関数を持つ.combineLatest()?
サンプルコード(動作しない):
const ac = [1, 2, 3]; // only as example, I have complex types in my array not numbers
Observable.from(ac)
.combineLatest(
// processFn should get a number as argument and return Observable<number>
// does not work because .combineLatest does not accept two functions as arguments :(
n => processFn1(n),
n => processFn2(n)
)
.map(([result1, result2] => {
// result1, result2 should be flat numbers here, not Observables
})
);
それを行う方法上の任意のアイデア?
あなたがそれを読んでたらそう些細な:) – Dyna
は、多くの場合、RxJSであるが、それは、それに使用を得るために、いくつかの時間がかかります:) – KwintenP