import { concreteSink, SinkInternal } from "@effect/core/stream/Sink/operations/_internal/SinkInternal" /** * @tsplus getter effect/core/stream/Sink exposeLeftover */ export function exposeLeftover( self: Sink ): Sink]> { concreteSink(self) return new SinkInternal( self.channel .doneCollect .map(([chunks, z]) => [z, chunks.flatten]) ) }