Skip to content

ReadableStream

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2553

The ReadableStream interface of the Streams API represents a readable stream of byte data.

MDN Reference

R = any

readonly locked: boolean

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2559

The locked read-only property of the ReadableStream interface returns whether or not the readable stream is locked to a reader.

MDN Reference

[asyncIterator](options?): AsyncIterableIterator<R>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2603

ReadableStreamValuesOptions

AsyncIterableIterator<R>


cancel(reason?): Promise<void>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2565

The cancel() method of the ReadableStream interface returns a Promise that resolves when the stream is canceled.

MDN Reference

any

Promise<void>


getReader(): ReadableStreamDefaultReader<R>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2571

The getReader() method of the ReadableStream interface creates a reader and locks the stream to it.

MDN Reference

ReadableStreamDefaultReader<R>

getReader(options): ReadableStreamBYOBReader

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2577

The getReader() method of the ReadableStream interface creates a reader and locks the stream to it.

MDN Reference

ReadableStreamGetReaderOptions

ReadableStreamBYOBReader


pipeThrough<T>(transform, options?): ReadableStream<T>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2583

The pipeThrough() method of the ReadableStream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.

MDN Reference

T

ReadableWritablePair<T, R>

StreamPipeOptions

ReadableStream<T>


pipeTo(destination, options?): Promise<void>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2592

The pipeTo() method of the ReadableStream interface pipes the current ReadableStream to a given WritableStream and returns a Promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.

MDN Reference

WritableStream<R>

StreamPipeOptions

Promise<void>


tee(): [ReadableStream<R>, ReadableStream<R>]

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2601

The tee() method of the two-element array containing the two resulting branches as new ReadableStream instances.

MDN Reference

[ReadableStream<R>, ReadableStream<R>]


values(options?): AsyncIterableIterator<R>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2602

ReadableStreamValuesOptions

AsyncIterableIterator<R>