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

optional
R = any

Properties

readonly
locked: boolean

Methods

cancel(reason?: any): Promise<void>
deprecated
getIterator(options?: { preventCancel?: boolean; }): AsyncIterableIterator<R>
pipeThrough<T>(unnamed 0: { writable: WritableStream<R>; readable: ReadableStream<T>; }, options?: PipeOptions): ReadableStream<T>
pipeTo(dest: WritableStream<R>, options?: PipeOptions): Promise<void>
[[Symbol.asyncIterator]](options?: { preventCancel?: boolean; }): AsyncIterableIterator<R>
variable ReadableStream

type

{ prototype: ReadableStream; new (underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number; size?: undefined; }): ReadableStream<Uint8Array>; new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>; }