Re: [whatwg/streams] const [ sideA, sideB ] = duplexPair(); (Issue #1325)

If I had to guess I'd say the ask for a convenience API the essentially implements:

```js
function duplexPair() {
  const {
    readable : r1,
    writable: w1,
  } = new TransformStream();
  const {
    readable: r2,
    writable: w2,
  } = new TransformStream();
  return [
    { readable: r1, writable: w2 },
    { readable: r2, writable: w1 },
  ];
}
```

But with some additional lifecycle handling that ensures half-open is optionally handled and error state is propagated across the two halves?

Similar to Node.js' equivalent API: https://nodejs.org/docs/latest/api/stream.html#streamduplexpairoptions

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1325#issuecomment-2338359440
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/issues/1325/2338359440@github.com>

Received on Monday, 9 September 2024 14:59:17 UTC