Skip to main content
Version: 0.1.1

Type Alias: Schema

Imported from @react-logic/utils

Schema = object

Top-level schema — keys are field names, values are configs or groups. Uses any because FieldConfig<T>'s contravariant fn parameter makes e.g. FieldConfig<number> not assignable to FieldConfig<unknown> — but the schema needs to accept either. Inference downstream is preserved by the const S extends Schema constraint on formState.

Index Signature

[key: string]: FieldConfig<any> | FormGroup<any>