type-alias / @typed/ui/Form

SchemaFieldNameFor

Struct field names matching both decoded and encoded control value types.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
Field types
Since
1.0.0

Import

import type { SchemaFieldNameFor } from "@typed/ui/Form";

Signatures

export type SchemaFieldNameFor<Fields extends FormFields, Value, Encoded> = {
    [Key in keyof Fields & string]: Fields[Key]["Type"] extends Value ? Fields[Key]["Encoded"] extends Encoded ? Key : never : never;
}[keyof Fields & string];

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source