// ets_tracing: off import { pipe } from "../../../../Function/index.js" import type * as M from "../../../../Managed/index.js" import * as CH from "../../Channel/index.js" import type * as SK from "../../Sink/index.js" import type * as C from "../core.js" export function runManaged_( self: C.Stream, sink: SK.Sink ): M.Managed { return pipe(CH.pipeTo_(self.channel, sink.channel), CH.drain, CH.runManaged) } /** * @ets_data_first runManaged_ */ export function runManaged(sink: SK.Sink) { return (self: C.Stream) => runManaged_(self, sink) }