TransformStreamDefaultController
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:2802
The TransformStreamDefaultController interface of the Streams API provides methods to manipulate the associated ReadableStream and WritableStream.
Type Parameters
Section titled “Type Parameters”O = any
Accessors
Section titled “Accessors”desiredSize
Section titled “desiredSize”Get Signature
Section titled “Get Signature”get desiredSize():
null|number
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:2808
The desiredSize read-only property of the TransformStreamDefaultController interface returns the desired size to fill the queue of the associated ReadableStream.
Returns
Section titled “Returns”null | number
Methods
Section titled “Methods”enqueue()
Section titled “enqueue()”enqueue(
chunk?):void
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:2814
The enqueue() method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream.
Parameters
Section titled “Parameters”chunk?
Section titled “chunk?”O
Returns
Section titled “Returns”void
error()
Section titled “error()”error(
reason):void
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:2820
The error() method of the TransformStreamDefaultController interface errors both sides of the stream.
Parameters
Section titled “Parameters”reason
Section titled “reason”any
Returns
Section titled “Returns”void
terminate()
Section titled “terminate()”terminate():
void
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:2826
The terminate() method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream.
Returns
Section titled “Returns”void