import * as tsplus_module_1 from "@effect/core/stream/Stream/operations/fromCollection";
import * as tsplus_module_2 from "@effect/core/stream/Stream/operations/flattenPar";
/**
 * Merges a variable list of streams in a non-deterministic fashion. Up to `n`
 * streams may be consumed in parallel and up to `outputBuffer` chunks may be
 * buffered by this operator.
 *
 * @tsplus static ets/Stream/Ops mergeAll
 */

export function mergeAll(n, outputBuffer = 16, __tsplusTrace) {
  return (...streams) => tsplus_module_2.flattenPar(tsplus_module_1.fromCollection(() => streams, __tsplusTrace), n, outputBuffer, __tsplusTrace);
}
//# sourceMappingURL=mergeAll.mjs.map