Skip to main content

fromWeb

method default.Duplex.fromWeb
unstable
Jump to headingDuplex.fromWeb(
duplexStream: { readable: streamWeb.ReadableStream; writable: streamWeb.WritableStream; },
options?: Pick<DuplexOptions,
"allowHalfOpen"
| "decodeStrings"
| "encoding"
| "highWaterMark"
| "objectMode"
| "signal"
>
,
): Duplex

A utility method for creating a Duplex from a web ReadableStream and WritableStream.

Parameters Jump to heading

Jump to headingduplexStream: { readable: streamWeb.ReadableStream; writable: streamWeb.WritableStream; }
optional
Jump to headingoptions: Pick<DuplexOptions,
"allowHalfOpen"
| "decodeStrings"
| "encoding"
| "highWaterMark"
| "objectMode"
| "signal"
>

Return Type Jump to heading

Back to top