LiveKit JS Client SDK - v2.18.2
    Preparing search index...

    Type Alias Serializer<Input, Output>Beta

    A bidirectional data format descriptor for message payloads.

    • parse(raw) decodes an incoming wire string into Input (used by handlers)
    • serialize(val) encodes an Output value to a wire string (used by handlers)

    For symmetric serializers (serializers.raw), Input === Output === string. For serializers.json, both default to any so each handler can annotate its own types. Use serializers.custom to supply your own parse/serialize pair.

    type Serializer<Input, Output> = {
        parse: (raw: string) => Input;
        serialize: (val: Output) => string;
        symbol: typeof SerializerSymbol;
    }

    Type Parameters

    • Input
    • Output
    Index

    Properties

    parse: (raw: string) => Input
    serialize: (val: Output) => string
    symbol: typeof SerializerSymbol