Type Alias

GLib-2.0GLib$ParseRecursiveVariantDict

$ParseRecursiveVariantDict: string extends State
    ? VariantTypeError<
        "$ParseRecursiveVariantDict: 'string' is not a supported type.",
    >
    : State extends `${infer Key}${infer AfterKey}`
        ? Key extends | "s"
        | "o"
        | "g"
        | "n"
        | "q"
        | "t"
        | "d"
        | "u"
        | "i"
        | "x"
        | "y"
            ? AfterKey extends `v}${infer Remaining}`
                ? [CreateIndexType<Key, unknown>, Remaining]
                : $ParseRecursiveVariantValue<AfterKey> extends [
                    infer V,
                    `}${infer Remaining}`,
                ]
                    ? [CreateIndexType<Key, V>, Remaining]
                    : VariantTypeError<`Invalid dictionary value type in: ${AfterKey}`>
            : 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