Observable 中是否有一个构建在链中的前一个完成后触发下一个?

Is there a build in Observable that fires next after the previous in the chain has completed?

我正在寻找一些预构建的功能来做这样的事情:

const Rx = require('rxjs');
const proto = Rx.Observable.prototype;

proto.whenCompleted = function () {

    const source = this;

    return Rx.Observable.create(sub => {

        const ret = [];
        return source.subscribe(
            function (v) {
                ret.push(v);
            },
            function (e) {
                sub.error(e);
            },
            function () {
                sub.next(ret);
            }
        )

    });

};

是否有 RxJS 可观察方法可以做到这一点?

concat 允许您合并流 "one after another".

例如:在下面的例子中,流将首先发出 1、2、3,然后才发送表单更改。

from([1, 2, 3])
.pipe( 
  concat(
    myForm.get('age').valueChanges
  ) 
)