Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
interface ReadableStream

This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.

Type Parameters

R = any


locked: boolean


cancel(reason?: any): Promise<void>
getReader(options: { mode: "byob"; }): ReadableStreamBYOBReader
getReader(options?: { mode?: undefined; }): ReadableStreamDefaultReader<R>
pipeThrough<T>(transform: { writable: WritableStream<R>; readable: ReadableStream<T>; }, options?: PipeOptions): ReadableStream<T>
pipeTo(dest: WritableStream<R>, options?: PipeOptions): Promise<void>
values(options?: { preventCancel?: boolean; }): AsyncIterableIterator<R>
[[Symbol.asyncIterator]](options?: { preventCancel?: boolean; }): AsyncIterableIterator<R>
variable ReadableStream


{ readonly prototype: ReadableStream; new (underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number; size?: undefined; }): ReadableStream<Uint8Array>; new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>; from<R>(asyncIterable: AsyncIterable<R> | Iterable<R | PromiseLike<R>>): ReadableStream<R>; }