TransformStreamDefaultController

The TransformStreamDefaultController interface of the Streams API provides methods to manipulate the associated ReadableStream and WritableStream.

MDN Reference

Properties

Link copied to clipboard

The desiredSize read-only property of the TransformStreamDefaultController interface returns the desired size to fill the queue of the associated ReadableStream.

Functions

Link copied to clipboard
fun enqueue(chunk: O = definedExternally)

The enqueue() method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream.

Link copied to clipboard
fun error(reason: JsError? = definedExternally)

The error() method of the TransformStreamDefaultController interface errors both sides of the stream.

Link copied to clipboard
fun terminate()

The terminate() method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream.