()
| 95 | const loopbackDuplex = (respond: (chunk: Buffer, push: (data: Uint8Array) => void) => void): Duplex => { |
| 96 | const duplex: Duplex = new Duplex({ |
| 97 | read() {}, |
| 98 | write(chunk: Buffer, _encoding, callback) { |
| 99 | respond(chunk, (data) => { |
| 100 | duplex.push(data) |