Thruput TypeScript protocol bindings
    Preparing search index...

    Type Alias VarString<N>

    VarString: string & { max_length?: N }

    A string of at most N UTF-8 encoded bytes.

    max_length is a phantom type-level annotation: it does not exist at runtime, and any string is assignable. Note the bound counts encoded bytes, not code points. The codec enforces the bound when encoding and decoding.

    Type Parameters

    • N extends number