"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeWith = void 0;
const Observable_js_1 = require("../Observable.js");
const mergeAll_js_1 = require("../operators/mergeAll.js");
function mergeWith(...otherSources) {
    return (source) => new Observable_js_1.Observable((subscriber) => {
        (0, mergeAll_js_1.mergeAll)()((0, Observable_js_1.from)([source, ...otherSources])).subscribe(subscriber);
    });
}
exports.mergeWith = mergeWith;