ReadableStreamDefaultController
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2715
The ReadableStreamDefaultController interface of the Streams API represents a controller allowing control of a ReadableStream’s state and internal queue.
Type Parameters
Section titled “Type Parameters”R = any
Accessors
Section titled “Accessors”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:2721
The desiredSize read-only property of the required to fill the stream’s internal queue.
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:2727
The close() method of the ReadableStreamDefaultController 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:2733
The enqueue() method of the js-nolint enqueue(chunk) - chunk - : The chunk to enqueue.
Parameters
Section titled “Parameters”chunk?
Section titled “chunk?”R
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:2739
The error() method of the with the associated stream to error.
Parameters
Section titled “Parameters”reason
Section titled “reason”any
Returns
Section titled “Returns”void