(stream: Readable, cleanup: () => void)
| 443 | // Keep consuming after the consumer's listeners are removed, so the producer |
| 444 | // can finish and any late error stays handled. |
| 445 | const drainReadable = (stream: Readable, cleanup: () => void): void => { |
| 446 | cleanup() |
| 447 | const done = finished(stream, { readable: true, writable: false }, () => done()) |
| 448 | stream.resume() |
| 449 | } |
| 450 | |
| 451 | const readableToPullUnsafe = <A, E>(options: { |
| 452 | readonly scope: Scope.Scope |