/** * Returns a new channel which reads all the elements from upstream's output * channel and ignores them, then terminates with the upstream result value. * * @tsplus getter effect/core/stream/Channel drain */ export function drain( self: Channel ): Channel { const drainer: Channel = Channel .readWithCause( () => drainer, (cause) => Channel.failCause(cause), Channel.succeed ) return self >> drainer }