Skip to main content
Skip to main content

ReadableStream

This Streams API interface represents a readable stream of byte data.

Type parameters

RobjectRequired

Properties

lockedbooleanRequired

Methods

[asyncIterator]

Returns

AsyncIterableIteratorAsyncIterableIterator<R>Required

cancel

Parameters

reasonany

Returns

PromisePromise<void>Required

getReader

getReader(): ReadableStreamDefaultReader<R>

Returns

ReadableStreamDefaultReaderReadableStreamDefaultReader<R>Required

getReader(options): ReadableStreamBYOBReader

Parameters

optionsobjectRequired
options.mode"byob"Required

Returns

ReadableStreamBYOBReaderanyRequired

pipeThrough

Parameters

transformReadableWritablePair<T, R>Required

Returns

ReadableStreamReadableStream<T>Required

pipeTo

Parameters

destinationWritableStream<R>Required

Returns

PromisePromise<void>Required

tee

Returns

[[`ReadableStream`](/references/js-client/modules/internal#readablestream-1)<`R`\>, [`ReadableStream`](/references/js-client/modules/internal#readablestream-1)<`R`\>][ReadableStream<R>, ReadableStream<R>]Required

values

Parameters

optionsobject
options.preventCancelboolean

Returns

AsyncIterableIteratorAsyncIterableIterator<R>Required
Was this section helpful?