@camunda8/sdk
    Preparing search index...

    Interface StreamHandle

    The value returned by every streaming API in the SDK. Extends the original { close } return type backward-compatibly with a failure channel.

    • state is the current state; read it any time.
    • done resolves (never rejects) with the terminal reason when the handle reaches closed.

    Handle states are only ever produced by createStreamHandle; the brand stops a structural { close } literal from passing as a stream handle.

    interface StreamHandle {
        "[STREAM_HANDLE_BRAND]": true;
        done: Promise<StreamClosedReason>;
        state: StreamState;
        close(): void;
    }
    Index

    Properties

    "[STREAM_HANDLE_BRAND]": true
    done: Promise<StreamClosedReason>

    Resolves with the terminal reason when the handle becomes closed.

    The current state of the stream.

    Methods