关于 RXJS 运算符的解释 "withLatestFrom"

Explanation about RXJS operator "withLatestFrom"

谁能解释一下 withLatestFrom 是做什么的?我阅读了文档,但不确定我是否理解。 谢谢

withLatestFrom 从不同的流中读取值,但它本身并不启动可观察流。

一个例子:

a$.pipe(
  withLatesFrom(b$),
).subscribe(([a, b]) => console.log(a, b));

每次 a$ 发出时,它都会 query/read 下游使用的 b$ 值。但是请注意,如果 b$ 发出,可观察流不会 emit/process.