Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
interface ReadableWritablePair
import { type ReadableWritablePair } from "https://deno.land/x/yxz@0.17.0/typing/lib.dom.ts";

Type Parameters

optional
R = any
optional
W = any

Properties

readable: ReadableStream<R>
writable: WritableStream<W>

Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.

Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.