@servicenow/sdk - v4.9.0
    Preparing search index...

    Interface TransformStreamDefaultController<O>

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

    MDN Reference

    interface TransformStreamDefaultController<O = any> {
        desiredSize: number | null;
        enqueue(chunk?: O): void;
        error(reason?: any): void;
        terminate(): void;
    }

    Type Parameters

    • O = any
    Index

    Properties

    desiredSize: number | null

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

    MDN Reference

    Methods

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

      MDN Reference

      Parameters

      • Optionalchunk: O

      Returns void

    • The error() method of the TransformStreamDefaultController interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.

      MDN Reference

      Parameters

      • Optionalreason: any

      Returns void

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

      MDN Reference

      Returns void