Type Alias

GLib-2.0GLib$ParseDeepVariantDict

$ParseDeepVariantDict: string extends State
    ? VariantTypeError<
        "$ParseDeepVariantDict: '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, GLib.Variant>, Remaining]
                : $ParseDeepVariantValue<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 content for deep unpacking For a{sv}, deepUnpack() preserves Variant values (GJS test behavior)

Type Parameters

  • State extends string