Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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.

interface ReadableStream <R = any> {
readonly locked: boolean;
[[Symbol.asyncIterator]](options?: {
preventCancel?: boolean;
}
): AsyncIterableIterator<R>;
cancel(reason?: any): Promise<void>;
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
}
var ReadableStream: {
prototype: ReadableStream;
new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
}
;

§Type Parameters

§
R = any
[src]

§Properties

§
readonly locked: boolean
[src]

§Methods

§
[[Symbol.asyncIterator]](options?: {
preventCancel?: boolean;
}
): AsyncIterableIterator<R>
[src]
§
cancel(reason?: any): Promise<void>
[src]
§
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>
[src]
§
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>
[src]