Skip to main content

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

Properties #

#locked: boolean
readonly

Methods #

#cancel(reason?: any): Promise<void>
#getReader(options: { mode: "byob"; }): ReadableStreamBYOBReader
#pipeTo(
destination: WritableStream<R>,
): Promise<void>
#values(options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>
#[[Symbol.asyncIterator]](options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>

variable ReadableStream

The constructor object for ReadableStream, used to create a readable stream from an underlying source describing how data is enqueued and consumed.

Properties #

Methods #

#from<R>(asyncIterable: AsyncIterable<R> | Iterable<R | PromiseLike<R>> & object): ReadableStream<R>

Did you find what you needed?

Privacy policy