"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.endWith = void 0;
const Observable_js_1 = require("../Observable.js");
function endWith(...values) {
    return (source) => new Observable_js_1.Observable((destination) => {
        source.subscribe((0, Observable_js_1.operate)({
            destination,
            complete: () => {
                (0, Observable_js_1.subscribeToArray)(values, destination);
            },
        }));
    });
}
exports.endWith = endWith;