Options
All
  • Public
  • Public/Protected
  • All
Menu

Allows control of the ReadableStream and WritableStream of the associated TransformStream.

Type parameters

  • O

Hierarchy

  • TransformStreamDefaultController

Index

Constructors

Properties

Methods

Constructors

Private constructor

Properties

Readonly desiredSize

desiredSize: null | number

Returns the desired size to fill the readable side’s internal queue. It can be negative, if the queue is over-full.

Methods

enqueue

  • enqueue(chunk: O): void
  • Enqueues the given chunk chunk in the readable side of the controlled transform stream.

    Parameters

    • chunk: O

    Returns void

error

  • error(reason?: any): void
  • Errors both the readable side and the writable side of the controlled transform stream, making all future interactions with it fail with the given error e. Any chunks queued for transformation will be discarded.

    Parameters

    • Optional reason: any

    Returns void

terminate

  • terminate(): void
  • Closes the readable side and errors the writable side of the controlled transform stream. This is useful when the transformer only needs to consume a portion of the chunks written to the writable side.

    Returns void

Generated using TypeDoc