Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Type Alias DecodedFrame

    DecodedFrame:
        | { kind: "request"; id: JsonRpcId; method: string; params: unknown[] }
        | { kind: "notification"; method: string; params: unknown[] }
        | {
            kind: "response";
            id: JsonRpcId;
            result?: unknown;
            error?: JsonRpcError;
        }
        | {
            kind: "malformed";
            id: JsonRpcId
            | null;
            code: number;
            message: string;
        }

    A decoded frame, discriminated so a caller cannot forget a case.

    Type Declaration

    • { kind: "request"; id: JsonRpcId; method: string; params: unknown[] }

      A call expecting a reply on id.

    • { kind: "notification"; method: string; params: unknown[] }

      A call expecting no reply.

    • { kind: "response"; id: JsonRpcId; result?: unknown; error?: JsonRpcError }

      A reply to something we sent. Exactly one of result / error is set.

    • { kind: "malformed"; id: JsonRpcId | null; code: number; message: string }

      Undecodable. Echo id when the offending request identified itself.