Type Alias

GLib-2.0GLib$ParseRecursiveVariantDict

$ParseRecursiveVariantDict: string extends State
    ? VariantTypeError<
        "$ParseRecursiveVariantDict: '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"
                ? [CreateIndexType<Key, any>, Remaining]
                : $ParseRecursiveVariantValue<ValueType> extends [infer V, ""]
                    ? [CreateIndexType<Key, V>, Remaining]
                    : VariantTypeError<`Invalid dictionary value type: ${ValueType}`>
            : VariantTypeError<`Invalid dictionary key type: ${Key}`>
        : VariantTypeError<`Invalid dictionary format: ${State}`>

Parses dictionary for recursive unpacking - fully unpacks all values

Type Parameters

  • State extends string