Skip to content
On this page


An identity function whose argument type extends the Form type. This function is used for type checking.

function defineForm<T extends Form>(form: T): T {
  return form;

Details of Form type

An object that satisfies the following:

  • Key
    • Starting with $ are not available.
  • Value is one of the following
type Form = {
  [key: `$${string}`]: never;
  [key: string]:
    | Field<any>
    | PrivateField<any>
    | FormsField<(arg: any) => Form>
    | ((...args: any[]) => any)
    | Form;