Type Alias

GLib-2.0GLib$ParseRecursiveVariantKeyValue

$ParseRecursiveVariantKeyValue: string extends State
    ? VariantTypeError<
        "$ParseRecursiveVariantKeyValue: 'string' is not a supported type.",
    >
    : State extends `${infer Key}${infer ValueType}}${infer Remaining}`
        ? Key extends | "s"
        | "o"
        | "g"
        | "n"
        | "q"
        | "t"
        | "d"
        | "u"
        | "i"
        | "x"
        | "y"
            ? ValueType extends "v"
                ? [[BasicTypeMap<Key>, any], Remaining]
                : $ParseRecursiveVariantValue<ValueType> extends [infer V, ""]
                    ? [[BasicTypeMap<Key>, V], Remaining]
                    : VariantTypeError<`Invalid key-value value type: ${ValueType}`>
            : VariantTypeError<`Invalid key-value key type: ${Key}`>
        : VariantTypeError<`Invalid key-value format: ${State}`>

Parses key-value for recursive unpacking

Type Parameters

  • State extends string