Type Alias

GLib-2.0GLib$ParseConstructorInputKeyValue

$ParseConstructorInputKeyValue: string extends State
    ? VariantTypeError<"Invalid key-value state">
    : State extends `${infer Key}${infer ValueType}}${infer Remaining}`
        ? Key extends | "s"
        | "o"
        | "g"
        | "n"
        | "q"
        | "t"
        | "d"
        | "u"
        | "i"
        | "x"
        | "y"
            ? $ParseConstructorInputValue<ValueType> extends [infer V, ""]
                ? [[BasicTypeMap<Key>, V], Remaining]
                : VariantTypeError<"Invalid key-value value type">
            : VariantTypeError<"Invalid key-value key type">
        : VariantTypeError<"Invalid key-value format">

Parses key-value for constructor input

Type Parameters

  • State extends string