ReadableByteStreamController
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2746
The ReadableByteStreamController interface of the Streams API represents a controller for a readable byte stream.
Accessors
Section titled “Accessors”byobRequest
Section titled “byobRequest”Get Signature
Section titled “Get Signature”get byobRequest():
null|ReadableStreamBYOBRequest
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2752
The byobRequest read-only property of the ReadableByteStreamController interface returns the current BYOB request, or null if there are no pending requests.
Returns
Section titled “Returns”null | ReadableStreamBYOBRequest
desiredSize
Section titled “desiredSize”Get Signature
Section titled “Get Signature”get desiredSize():
null|number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2758
The desiredSize read-only property of the ReadableByteStreamController interface returns the number of bytes required to fill the stream’s internal queue to its ‘desired size’.
Returns
Section titled “Returns”null | number
Methods
Section titled “Methods”close()
Section titled “close()”close():
void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2764
The close() method of the ReadableByteStreamController interface closes the associated stream.
Returns
Section titled “Returns”void
enqueue()
Section titled “enqueue()”enqueue(
chunk):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2770
The enqueue() method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream’s internal queues).
Parameters
Section titled “Parameters”ArrayBuffer | ArrayBufferView<ArrayBufferLike>
Returns
Section titled “Returns”void
error()
Section titled “error()”error(
reason):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2776
The error() method of the ReadableByteStreamController interface causes any future interactions with the associated stream to error with the specified reason.
Parameters
Section titled “Parameters”reason
Section titled “reason”any
Returns
Section titled “Returns”void