import * as tsplus_module_1 from "@effect/core/stream/Channel/operations/pipeToOrFail";
import { concreteSink } from "@effect/core/stream/Sink/operations/_internal/SinkInternal";
import { concreteStream, StreamInternal } from "@effect/core/stream/Stream/operations/_internal/StreamInternal";
/**
 * Pipes all of the values from this stream through the provided sink.
 *
 * @tsplus fluent ets/Stream pipeThrough
 */

export function pipeThrough_(self, sink, __tsplusTrace) {
  void 0;
  return new StreamInternal(tsplus_module_1.pipeToOrFail_(self.channel, () => {
    const sink0 = sink();
    void 0;
    return sink0.channel;
  }));
}
/**
 * Pipes all of the values from this stream through the provided sink.
 *
 * @tsplus static ets/Stream/Aspects pipeThrough
 */

export const pipeThrough = (sink, __tsplusTrace) => self => pipeThrough_(self, sink, __tsplusTrace);
//# sourceMappingURL=pipeThrough.mjs.map