web-serial-rxjs API Documentation
    Preparing search index...

    Variable SerialSessionStateConst

    SerialSessionState: {
        Connected: "connected";
        Connecting: "connecting";
        Disconnecting: "disconnecting";
        Error: "error";
        Idle: "idle";
        Unsupported: "unsupported";
    } = ...

    Reactive lifecycle state for a SerialSession.

    This is the v2 API counterpart of the legacy SerialState used by SerialClient. The runtime values are the same flat strings v1 consumers used for UI switches; the SerialSessionState const object is the canonical source of those literals so call sites can avoid string typos and get IDE completion.

    Lifecycle transitions:

    idle -> connecting -> connected -> disconnecting -> idle
    \-> error
    (any) -> unsupported (when Web Serial API is unavailable)
    (any) -> error (when an unrecoverable failure occurs)

    Type Declaration

    • ReadonlyConnected: "connected"
    • ReadonlyConnecting: "connecting"
    • ReadonlyDisconnecting: "disconnecting"
    • ReadonlyError: "error"
    • ReadonlyIdle: "idle"
    • ReadonlyUnsupported: "unsupported"