MCPcopy Index your code
hub / github.com/Effect-TS/effect / drain

Function drain

packages/effect/src/internal/channel.ts:435–445  ·  view source on GitHub ↗
(
  self: Channel.Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
)

Source from the content-addressed store, hash-verified

433
434/** @internal */
435export const drain = <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
436 self: Channel.Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
437): Channel.Channel<never, InElem, OutErr, InErr, OutDone, InDone, Env> => {
438 const drainer: Channel.Channel<never, OutElem, OutErr, OutErr, OutDone, OutDone, Env> = core
439 .readWithCause({
440 onInput: () => drainer,
441 onFailure: core.failCause,
442 onDone: core.succeed
443 })
444 return core.pipeTo(self, drainer)
445}
446
447/** @internal */
448export const emitCollect = <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(

Callers 1

runDrainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected