Skip to content

API Reference / @gtkx/runtime / VariantValue

Type Alias: VariantValue<S>

VariantValue<S> = [Parse<S>] extends [never] ? unknown : Parse<S> extends [infer V, ""] ? V : unknown

Defined in: packages/runtime/dist/variant.d.ts:60

JavaScript type a variant of type string S unpacks to, or unknown when S is not one complete type.

Type Parameters

S

S extends string

Released under the MPL-2.0 License.