// ets_tracing: off import type * as T from "../../../../Effect/index.js" import * as CH from "../../Channel/index.js" import type * as SK from "../../Sink/index.js" import type * as C from "../core.js" /** * Runs the sink on the stream to produce either the sink's result or an error. */ export function run_( self: C.Stream, sink: SK.Sink ): T.Effect { return CH.runDrain(self.channel[">>>"](sink.channel)) } /** * Runs the sink on the stream to produce either the sink's result or an error. * * @ets_data_first run_ */ export function run( sink: SK.Sink ): (self: C.Stream) => T.Effect { return (self) => run_(self, sink) }