mise API - v0.0.0
    Preparing search index...

    Interface OutputSink

    Destination for command output, installed by the host.

    interface OutputSink {
        data_write(chunk: string | Buffer<ArrayBufferLike>): void;
        err_write(chunk: string | Buffer<ArrayBufferLike>): void;
        event_write?(kind: string, data: unknown): void;
        progress_write(event: ProgressEvent): void;
        status_write(text: string): void;
    }

    Implemented by

    Index
    • Writes command output (the data channel).

      Parameters

      • chunk: string | Buffer<ArrayBufferLike>

        Printable text (ANSI permitted) or raw bytes.

      Returns void

    • Writes error-stream output (the err channel).

      Parameters

      • chunk: string | Buffer<ArrayBufferLike>

        Printable text (ANSI permitted) or raw bytes.

      Returns void

    • Sends a typed event to the command's origin surface, while the command runs.

      The kind names what the data is (games.trek.state); a surface shows the kinds it knows and drops the rest. Optional: a sink that predates events, or has nowhere to send one, leaves it out, and a command sends with sink.event_write?.(kind, data).

      Parameters

      • kind: string

        What the data is.

      • data: unknown

        The event, shaped by its kind; it must survive JSON.

      Returns void

    • Parameters

      Returns void

    • Writes an ephemeral status line (the status channel).

      Parameters

      • text: string

        Transient text; consumers may overwrite or drop it.

      Returns void