diff --git a/docs/framework/angular/reference/classes/tanstackfield.md b/docs/framework/angular/reference/classes/tanstackfield.md index 3fe19007b..c9c481001 100644 --- a/docs/framework/angular/reference/classes/tanstackfield.md +++ b/docs/framework/angular/reference/classes/tanstackfield.md @@ -11,7 +11,9 @@ title: TanStackField • **TName** *extends* `DeepKeys`\<`TParentData`\> -• **TFieldValidator** *extends* `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined` +• **TFieldValidator** *extends* + \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> + \| `undefined` = `undefined` • **TFormValidator** *extends* `Validator`\<`TParentData`, `unknown`\> \| `undefined` = `undefined` diff --git a/docs/framework/lit/reference/classes/tanstackformcontroller.md b/docs/framework/lit/reference/classes/tanstackformcontroller.md index b918a06a6..e913530bf 100644 --- a/docs/framework/lit/reference/classes/tanstackformcontroller.md +++ b/docs/framework/lit/reference/classes/tanstackformcontroller.md @@ -65,7 +65,9 @@ field(fieldConfig, render): object • **TName** *extends* `string` \| `number` -• **TFieldValidator** *extends* `undefined` \| `Validator`\<`DeepValue`\<`TParentData`, `TName`, `IsNullable`\<`TParentData`\>\>, `unknown`\> = `undefined` +• **TFieldValidator** *extends* + \| `undefined` + \| `Validator`\<`DeepValue`\<`TParentData`, `TName`, `IsNullable`\<`TParentData`\>\>, `unknown`\> = `undefined` • **TData** = `DeepValue`\<`TParentData`, `TName`, `IsNullable`\<`TParentData`\>\> diff --git a/docs/framework/react/reference/functions/field.md b/docs/framework/react/reference/functions/field.md deleted file mode 100644 index c1ac1504d..000000000 --- a/docs/framework/react/reference/functions/field.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: Field -title: Field ---- - -# Function: Field() - -```ts -function Field(__namedParameters): ReactNode -``` - -A function component that takes field options and a render function as children and returns a React component. - -The `Field` component uses the `useField` hook internally to manage the field instance. - -## Type Parameters - -• **TParentData** - -• **TName** *extends* `string` \| `number` - -• **TFieldValidator** *extends* `undefined` \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> = `undefined` - -• **TFormValidator** *extends* `undefined` \| `Validator`\<`TParentData`, `unknown`\> = `undefined` - -• **TData** = `DeepValue`\<`TParentData`, `TName`\> - -## Parameters - -### \_\_namedParameters - -`FieldComponentProps`\<`TParentData`, `TName`, `TFieldValidator`, `TFormValidator`, `TData`\> - -## Returns - -`ReactNode` - -## Defined in - -[packages/react-form/src/useField.tsx:164](https://github.com/TanStack/form/blob/main/packages/react-form/src/useField.tsx#L164) diff --git a/docs/framework/react/reference/functions/usefield.md b/docs/framework/react/reference/functions/usefield.md deleted file mode 100644 index 779a1954e..000000000 --- a/docs/framework/react/reference/functions/usefield.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -id: useField -title: useField ---- - -# Function: useField() - -```ts -function useField(opts): FieldApi & ReactFieldApi -``` - -A hook for managing a field in a form. - -## Type Parameters - -• **TParentData** - -• **TName** *extends* `string` \| `number` - -• **TFieldValidator** *extends* `undefined` \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> = `undefined` - -• **TFormValidator** *extends* `undefined` \| `Validator`\<`TParentData`, `unknown`\> = `undefined` - -• **TData** = `DeepValue`\<`TParentData`, `TName`\> - -## Parameters - -### opts - -`UseFieldOptions`\<`TParentData`, `TName`, `TFieldValidator`, `TFormValidator`, `TData`\> - -An object with field options. - -## Returns - -`FieldApi`\<`TParentData`, `TName`, `TFieldValidator`, `TFormValidator`, `TData`\> & `ReactFieldApi`\<`TParentData`, `TFormValidator`\> - -The `FieldApi` instance for the specified field. - -## Defined in - -[packages/react-form/src/useField.tsx:50](https://github.com/TanStack/form/blob/main/packages/react-form/src/useField.tsx#L50) diff --git a/docs/framework/react/reference/functions/useform.md b/docs/framework/react/reference/functions/useform.md deleted file mode 100644 index 6f877b2e9..000000000 --- a/docs/framework/react/reference/functions/useform.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -id: useForm -title: useForm ---- - -# Function: useForm() - -```ts -function useForm(opts?): ReactFormExtendedApi -``` - -A custom React Hook that returns an extended instance of the `FormApi` class. - -This API encapsulates all the necessary functionalities related to the form. It allows you to manage form state, handle submissions, and interact with form fields - -## Type Parameters - -• **TFormData** - -• **TFormValidator** *extends* `undefined` \| `Validator`\<`TFormData`, `unknown`\> = `undefined` - -## Parameters - -### opts? - -`FormOptions`\<`TFormData`, `TFormValidator`\> - -## Returns - -[`ReactFormExtendedApi`](../type-aliases/reactformextendedapi.md)\<`TFormData`, `TFormValidator`\> - -## Defined in - -[packages/react-form/src/useForm.tsx:57](https://github.com/TanStack/form/blob/main/packages/react-form/src/useForm.tsx#L57) diff --git a/docs/framework/react/reference/functions/usestore.md b/docs/framework/react/reference/functions/usestore.md deleted file mode 100644 index 45ed3f214..000000000 --- a/docs/framework/react/reference/functions/usestore.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -id: useStore -title: useStore ---- - -# Function: useStore() - -## Call Signature - -```ts -function useStore(store, selector?): TSelected -``` - -### Type Parameters - -• **TState** - -• **TSelected** = `NoInfer`\<`TState`\> - -### Parameters - -#### store - -`Store`\<`TState`, `any`\> - -#### selector? - -(`state`) => `TSelected` - -### Returns - -`TSelected` - -### Defined in - -node\_modules/.pnpm/@tanstack+react-store@0.7.0\_react-dom@18.3.1\_react@18.3.1\_\_react@18.3.1/node\_modules/@tanstack/react-store/dist/esm/index.d.ts:7 - -## Call Signature - -```ts -function useStore(store, selector?): TSelected -``` - -### Type Parameters - -• **TState** - -• **TSelected** = `NoInfer`\<`TState`\> - -### Parameters - -#### store - -`Derived`\<`TState`, `any`\> - -#### selector? - -(`state`) => `TSelected` - -### Returns - -`TSelected` - -### Defined in - -node\_modules/.pnpm/@tanstack+react-store@0.7.0\_react-dom@18.3.1\_react@18.3.1\_\_react@18.3.1/node\_modules/@tanstack/react-store/dist/esm/index.d.ts:8 diff --git a/docs/framework/react/reference/functions/usetransform.md b/docs/framework/react/reference/functions/usetransform.md deleted file mode 100644 index bc4ffb2cb..000000000 --- a/docs/framework/react/reference/functions/usetransform.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -id: useTransform -title: useTransform ---- - -# Function: useTransform() - -```ts -function useTransform(fn, deps): FormTransform -``` - -## Type Parameters - -• **TFormData** - -• **TFormValidator** *extends* `undefined` \| `Validator`\<`TFormData`, `unknown`\> = `undefined` - -## Parameters - -### fn - -(`formBase`) => `FormApi`\<`TFormData`, `TFormValidator`\> - -### deps - -`unknown`[] - -## Returns - -`FormTransform`\<`TFormData`, `TFormValidator`\> - -## Defined in - -[packages/react-form/src/useTransform.ts:3](https://github.com/TanStack/form/blob/main/packages/react-form/src/useTransform.ts#L3) diff --git a/docs/framework/react/reference/index.md b/docs/framework/react/reference/index.md deleted file mode 100644 index 599a63e0b..000000000 --- a/docs/framework/react/reference/index.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: "@tanstack/react-form" -title: "@tanstack/react-form" ---- - -# @tanstack/react-form - -## Interfaces - -- [ReactFormApi](interfaces/reactformapi.md) - -## Type Aliases - -- [FieldComponent](type-aliases/fieldcomponent.md) -- [ReactFormExtendedApi](type-aliases/reactformextendedapi.md) -- [UseField](type-aliases/usefield.md) - -## Functions - -- [Field](functions/field.md) -- [useField](functions/usefield.md) -- [useForm](functions/useform.md) -- [useStore](functions/usestore.md) -- [useTransform](functions/usetransform.md) diff --git a/docs/framework/react/reference/interfaces/reactformapi.md b/docs/framework/react/reference/interfaces/reactformapi.md deleted file mode 100644 index 8772804da..000000000 --- a/docs/framework/react/reference/interfaces/reactformapi.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -id: ReactFormApi -title: ReactFormApi ---- - -# Interface: ReactFormApi\ - -Fields that are added onto the `FormAPI` from `@tanstack/form-core` and returned from `useForm` - -## Type Parameters - -• **TFormData** - -• **TFormValidator** *extends* `Validator`\<`TFormData`, `unknown`\> \| `undefined` = `undefined` - -## Properties - -### Field - -```ts -Field: FieldComponent; -``` - -A React component to render form fields. With this, you can render and manage individual form fields. - -#### Defined in - -[packages/react-form/src/useForm.tsx:21](https://github.com/TanStack/form/blob/main/packages/react-form/src/useForm.tsx#L21) - -*** - -### Subscribe() - -```ts -Subscribe: (props) => ReactNode; -``` - -A `Subscribe` function that allows you to listen and react to changes in the form's state. It's especially useful when you need to execute side effects or render specific components in response to state updates. - -#### Type Parameters - -• **TSelected** = `FormState`\<`TFormData`\> - -#### Parameters - -##### props - -###### children - -`ReactNode` \| (`state`) => `ReactNode` - -###### selector - -(`state`) => `TSelected` - -#### Returns - -`ReactNode` - -#### Defined in - -[packages/react-form/src/useForm.tsx:25](https://github.com/TanStack/form/blob/main/packages/react-form/src/useForm.tsx#L25) diff --git a/docs/framework/react/reference/type-aliases/fieldcomponent.md b/docs/framework/react/reference/type-aliases/fieldcomponent.md deleted file mode 100644 index 7e72e1ea8..000000000 --- a/docs/framework/react/reference/type-aliases/fieldcomponent.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -id: FieldComponent -title: FieldComponent ---- - -# Type Alias: FieldComponent()\ - -```ts -type FieldComponent: ({ - children, - ...fieldOptions -}) => ReactNode; -``` - -A type alias representing a field component for a specific form data type. - -## Type Parameters - -• **TParentData** - -• **TFormValidator** *extends* `Validator`\<`TParentData`, `unknown`\> \| `undefined` = `undefined` - -## Type Parameters - -• **TName** *extends* `DeepKeys`\<`TParentData`\> - -• **TFieldValidator** *extends* `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined` - -• **TData** *extends* `DeepValue`\<`TParentData`, `TName`\> = `DeepValue`\<`TParentData`, `TName`\> - -## Parameters - -### \{ - children, - ...fieldOptions -\} - -`Omit`\<`FieldComponentProps`\<`TParentData`, `TName`, `TFieldValidator`, `TFormValidator`, `TData`\>, `"form"`\> - -## Returns - -`ReactNode` - -## Defined in - -[packages/react-form/src/useField.tsx:134](https://github.com/TanStack/form/blob/main/packages/react-form/src/useField.tsx#L134) diff --git a/docs/framework/react/reference/type-aliases/reactformextendedapi.md b/docs/framework/react/reference/type-aliases/reactformextendedapi.md deleted file mode 100644 index 15527cba0..000000000 --- a/docs/framework/react/reference/type-aliases/reactformextendedapi.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -id: ReactFormExtendedApi -title: ReactFormExtendedApi ---- - -# Type Alias: ReactFormExtendedApi\ - -```ts -type ReactFormExtendedApi: FormApi & ReactFormApi; -``` - -An extended version of the `FormApi` class that includes React-specific functionalities from `ReactFormApi` - -## Type Parameters - -• **TFormData** - -• **TFormValidator** *extends* `Validator`\<`TFormData`, `unknown`\> \| `undefined` = `undefined` - -## Defined in - -[packages/react-form/src/useForm.tsx:34](https://github.com/TanStack/form/blob/main/packages/react-form/src/useForm.tsx#L34) diff --git a/docs/framework/react/reference/type-aliases/usefield.md b/docs/framework/react/reference/type-aliases/usefield.md deleted file mode 100644 index 27f17d13f..000000000 --- a/docs/framework/react/reference/type-aliases/usefield.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -id: UseField -title: UseField ---- - -# Type Alias: UseField()\ - -```ts -type UseField: (opts) => FieldApi; -``` - -A type representing a hook for using a field in a form with the given form data type. - -A function that takes an optional object with a `name` property and field options, and returns a `FieldApi` instance for the specified field. - -## Type Parameters - -• **TParentData** - -• **TFormValidator** *extends* `Validator`\<`TParentData`, `unknown`\> \| `undefined` = `undefined` - -## Type Parameters - -• **TName** *extends* `DeepKeys`\<`TParentData`\> - -• **TFieldValidator** *extends* `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined` - -• **TData** *extends* `DeepValue`\<`TParentData`, `TName`\> = `DeepValue`\<`TParentData`, `TName`\> - -## Parameters - -### opts - -`Omit`\<`UseFieldOptions`\<`TParentData`, `TName`, `TFieldValidator`, `TFormValidator`, `TData`\>, `"form"`\> - -## Returns - -`FieldApi`\<`TParentData`, `TName`, `TFieldValidator`, `TFormValidator`, `TData`\> - -## Defined in - -[packages/react-form/src/useField.tsx:26](https://github.com/TanStack/form/blob/main/packages/react-form/src/useField.tsx#L26) diff --git a/docs/framework/solid/reference/functions/createfield.md b/docs/framework/solid/reference/functions/createfield.md index b03c59dc1..e519a4c14 100644 --- a/docs/framework/solid/reference/functions/createfield.md +++ b/docs/framework/solid/reference/functions/createfield.md @@ -15,7 +15,9 @@ function createField • **TName** *extends* `string` \| `number` -• **TFieldValidator** *extends* `undefined` \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> = `undefined` +• **TFieldValidator** *extends* + \| `undefined` + \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> = `undefined` • **TFormValidator** *extends* `undefined` \| `Validator`\<`TParentData`, `unknown`\> = `undefined` diff --git a/docs/framework/solid/reference/functions/field.md b/docs/framework/solid/reference/functions/field.md index 6613b3e90..353f05652 100644 --- a/docs/framework/solid/reference/functions/field.md +++ b/docs/framework/solid/reference/functions/field.md @@ -15,7 +15,9 @@ function Field(props • **TName** *extends* `string` \| `number` -• **TFieldValidator** *extends* `undefined` \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> = `undefined` +• **TFieldValidator** *extends* + \| `undefined` + \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> = `undefined` • **TFormValidator** *extends* `undefined` \| `Validator`\<`TParentData`, `unknown`\> = `undefined` diff --git a/docs/framework/solid/reference/type-aliases/createfield.md b/docs/framework/solid/reference/type-aliases/createfield.md index 6c74e7fb9..b5175b35e 100644 --- a/docs/framework/solid/reference/type-aliases/createfield.md +++ b/docs/framework/solid/reference/type-aliases/createfield.md @@ -6,7 +6,7 @@ title: CreateField # Type Alias: CreateField()\ ```ts -type CreateField: (opts) => () => FieldApi & SolidFieldApi; +type CreateField = (opts) => () => FieldApi & SolidFieldApi; ``` ## Type Parameters @@ -19,7 +19,9 @@ type CreateField: (o • **TName** *extends* `DeepKeys`\<`TParentData`\> -• **TFieldValidator** *extends* `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined` +• **TFieldValidator** *extends* + \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> + \| `undefined` = `undefined` • **TData** *extends* `DeepValue`\<`TParentData`, `TName`\> = `DeepValue`\<`TParentData`, `TName`\> diff --git a/docs/framework/solid/reference/type-aliases/fieldcomponent.md b/docs/framework/solid/reference/type-aliases/fieldcomponent.md index d953d3f8e..0483ea45e 100644 --- a/docs/framework/solid/reference/type-aliases/fieldcomponent.md +++ b/docs/framework/solid/reference/type-aliases/fieldcomponent.md @@ -6,7 +6,7 @@ title: FieldComponent # Type Alias: FieldComponent()\ ```ts -type FieldComponent: ({ +type FieldComponent = ({ children, ...fieldOptions }) => JSXElement; @@ -22,7 +22,9 @@ type FieldComponent: -• **TFieldValidator** *extends* `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined` +• **TFieldValidator** *extends* + \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> + \| `undefined` = `undefined` • **TData** *extends* `DeepValue`\<`TParentData`, `TName`\> = `DeepValue`\<`TParentData`, `TName`\> diff --git a/docs/framework/vue/reference/functions/usefield.md b/docs/framework/vue/reference/functions/usefield.md index cc91f6941..cdde78125 100644 --- a/docs/framework/vue/reference/functions/usefield.md +++ b/docs/framework/vue/reference/functions/usefield.md @@ -15,7 +15,9 @@ function useField(op • **TName** *extends* `string` \| `number` -• **TFieldValidator** *extends* `undefined` \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> = `undefined` +• **TFieldValidator** *extends* + \| `undefined` + \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> = `undefined` • **TFormValidator** *extends* `undefined` \| `Validator`\<`TParentData`, `unknown`\> = `undefined` diff --git a/docs/framework/vue/reference/interfaces/vueformapi.md b/docs/framework/vue/reference/interfaces/vueformapi.md index abe693ff5..c6345458d 100644 --- a/docs/framework/vue/reference/interfaces/vueformapi.md +++ b/docs/framework/vue/reference/interfaces/vueformapi.md @@ -45,7 +45,9 @@ Subscribe: (props, context) => any; ##### context -`SetupContext`\<`EmitsOptions`, `SlotsType`\<`object`\>\> +`SetupContext`\<`EmitsOptions`, `SlotsType`\<\{ + `default`: `FormState`\<`TFormData`\>; + \}\>\> #### Returns diff --git a/docs/framework/vue/reference/type-aliases/fieldcomponent.md b/docs/framework/vue/reference/type-aliases/fieldcomponent.md index 332ca141c..6cc87b97b 100644 --- a/docs/framework/vue/reference/type-aliases/fieldcomponent.md +++ b/docs/framework/vue/reference/type-aliases/fieldcomponent.md @@ -6,7 +6,7 @@ title: FieldComponent # Type Alias: FieldComponent()\ ```ts -type FieldComponent: (fieldOptions, context) => any; +type FieldComponent = (fieldOptions, context) => any; ``` ## Type Parameters @@ -19,7 +19,9 @@ type FieldComponent: -• **TFieldValidator** *extends* `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined` +• **TFieldValidator** *extends* + \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> + \| `undefined` = `undefined` • **TData** *extends* `DeepValue`\<`TParentData`, `TName`\> = `DeepValue`\<`TParentData`, `TName`\> @@ -31,7 +33,12 @@ type FieldComponent: \> +`SetupContext`\<\{\}, `SlotsType`\<\{ + `default`: \{ + `field`: `FieldApi`\<`TParentData`, `TName`, `TFieldValidator`, `TFormValidator`, `TData`\>; + `state`: `FieldApi`\<`TParentData`, `TName`, `TFieldValidator`, `TFormValidator`, `TData`\>\[`"state"`\]; + \}; + \}\>\> ## Returns diff --git a/docs/framework/vue/reference/type-aliases/usefield.md b/docs/framework/vue/reference/type-aliases/usefield.md index e0b8ff373..646995256 100644 --- a/docs/framework/vue/reference/type-aliases/usefield.md +++ b/docs/framework/vue/reference/type-aliases/usefield.md @@ -6,7 +6,7 @@ title: UseField # Type Alias: UseField()\ ```ts -type UseField: (opts) => object; +type UseField = (opts) => object; ``` ## Type Parameters @@ -19,7 +19,9 @@ type UseField: (opts • **TName** *extends* `DeepKeys`\<`TParentData`\> -• **TFieldValidator** *extends* `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined` +• **TFieldValidator** *extends* + \| `Validator`\<`DeepValue`\<`TParentData`, `TName`\>, `unknown`\> + \| `undefined` = `undefined` • **TData** *extends* `DeepValue`\<`TParentData`, `TName`\> = `DeepValue`\<`TParentData`, `TName`\> diff --git a/docs/framework/vue/reference/variables/field.md b/docs/framework/vue/reference/variables/field.md index 9336d31d3..66937c729 100644 --- a/docs/framework/vue/reference/variables/field.md +++ b/docs/framework/vue/reference/variables/field.md @@ -6,7 +6,7 @@ title: Field # Variable: Field() ```ts -const Field: (props) => CreateComponentPublicInstanceWithMixins & object & {} | {}, object, object, object, object, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, PublicProps, object, false, object, object, object, object, string, object, any, ComponentProvideOptions, OptionTypesType, object & FieldApiOptions & { mode?: "value" | ... 1 more ... | undefined; } & ({ ...; } | { ...; }), object, object, object, object, object>; +const Field: (props) => CreateComponentPublicInstanceWithMixins & object & {} | {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, ComponentProvideOptions, OptionTypesType<{}, {}, {}, {}, {}, {}>, object & FieldApiOptions & { mode?: "value" | ... 1 more ... | undefined; } & ({ ...; } | { ...; }), {}, {}, {}, {}, {}>; ``` ## Parameters @@ -17,7 +17,7 @@ FieldApiOptions\ & ## Returns -`CreateComponentPublicInstanceWithMixins`\<`FieldApiOptions`\<`TParentData`, `TName`, `TFieldValidator`, `TFormValidator`, `TData`\> & `object` & \{\} \| \{\}, `object`, `object`, `object`, `object`, `ComponentOptionsMixin`, `ComponentOptionsMixin`, `EmitsOptions`, `PublicProps`, `object`, `false`, `object`, `object`, `object`, `object`, `string`, `object`, `any`, `ComponentProvideOptions`, `OptionTypesType`\<`object`, `object`, `object`, `object`, `object`, `object`\>, `object` & FieldApiOptions\ & \{ mode?: "value" \| ... 1 more ... \| undefined; \} & (\{ ...; \} \| \{ ...; \}), `object`, `object`, `object`, `object`, `object`\> +`CreateComponentPublicInstanceWithMixins`\<`FieldApiOptions`\<`TParentData`, `TName`, `TFieldValidator`, `TFormValidator`, `TData`\> & `object` & \{\} \| \{\}, \{\}, \{\}, \{\}, \{\}, `ComponentOptionsMixin`, `ComponentOptionsMixin`, `EmitsOptions`, `PublicProps`, \{\}, `false`, \{\}, \{\}, \{\}, \{\}, `string`, \{\}, `any`, `ComponentProvideOptions`, `OptionTypesType`\<\{\}, \{\}, \{\}, \{\}, \{\}, \{\}\>, `object` & FieldApiOptions\ & \{ mode?: "value" \| ... 1 more ... \| undefined; \} & (\{ ...; \} \| \{ ...; \}), \{\}, \{\}, \{\}, \{\}, \{\}\> ## Defined in diff --git a/docs/reference/classes/fieldapi.md b/docs/reference/classes/fieldapi.md index ee7290043..0e53d6cd7 100644 --- a/docs/reference/classes/fieldapi.md +++ b/docs/reference/classes/fieldapi.md @@ -19,7 +19,9 @@ the `new FieldApi` constructor. • **TName** *extends* [`DeepKeys`](../type-aliases/deepkeys.md)\<`TParentData`\> -• **TFieldValidator** *extends* `Validator`\<[`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined` +• **TFieldValidator** *extends* + \| `Validator`\<[`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>, `unknown`\> + \| `undefined` = `undefined` • **TFormValidator** *extends* `Validator`\<`TParentData`, `unknown`\> \| `undefined` = `undefined` @@ -96,7 +98,7 @@ The field options. ### store ```ts -store: Derived, readonly any[]>; +store: Derived>; ``` The field state store. @@ -558,7 +560,9 @@ Updates the field instance with new options. ### validate() ```ts -validate(cause): ValidationError[] | Promise +validate(cause): + | ValidationError[] +| Promise ``` Validates the field value. @@ -571,7 +575,8 @@ Validates the field value. #### Returns -[`ValidationError`](../type-aliases/validationerror.md)[] \| `Promise`\<[`ValidationError`](../type-aliases/validationerror.md)[]\> + \| [`ValidationError`](../type-aliases/validationerror.md)[] + \| `Promise`\<[`ValidationError`](../type-aliases/validationerror.md)[]\> #### Defined in diff --git a/docs/reference/classes/formapi.md b/docs/reference/classes/formapi.md index d9b818804..3219f6b19 100644 --- a/docs/reference/classes/formapi.md +++ b/docs/reference/classes/formapi.md @@ -72,7 +72,7 @@ A record of field information for each field in the form. ### fieldMetaDerived ```ts -fieldMetaDerived: Derived ? PrefixTupleAccessor, AllowedIndexes, never>, []> : TFormData extends any[] ? PrefixArrayAccessor, [any]> : TFormData extends Date ? never : TFormData extends object ? PrefixObjectAccessor, []> : TFormData extends string | number | bigint | boolean ? "" : never, FieldMeta>, readonly any[]>; +fieldMetaDerived: Derived ? PrefixTupleAccessor, AllowedIndexes, never>, []> : TFormData extends any[] ? PrefixArrayAccessor, [any]> : TFormData extends Date ? never : TFormData extends object ? PrefixObjectAccessor, []> : TFormData extends string | number | bigint | boolean ? "" : never, FieldMeta>>; ``` #### Defined in @@ -98,7 +98,7 @@ The options for the form. ### store ```ts -store: Derived, readonly any[]>; +store: Derived>; ``` #### Defined in @@ -773,7 +773,9 @@ Validates the children of a specified array in the form starting from a given in ### validateField() ```ts -validateField(field, cause): ValidationError[] | Promise +validateField(field, cause): + | ValidationError[] +| Promise ``` Validates a specified field in the form using the correct handlers for a given validation type. @@ -794,7 +796,8 @@ Validates a specified field in the form using the correct handlers for a given v #### Returns -[`ValidationError`](../type-aliases/validationerror.md)[] \| `Promise`\<[`ValidationError`](../type-aliases/validationerror.md)[]\> + \| [`ValidationError`](../type-aliases/validationerror.md)[] + \| `Promise`\<[`ValidationError`](../type-aliases/validationerror.md)[]\> #### Defined in diff --git a/docs/reference/functions/formoptions.md b/docs/reference/functions/formoptions.md index ba679302f..b0a473a90 100644 --- a/docs/reference/functions/formoptions.md +++ b/docs/reference/functions/formoptions.md @@ -6,7 +6,9 @@ title: formOptions # Function: formOptions() ```ts -function formOptions(defaultOpts?): undefined | FormOptions +function formOptions(defaultOpts?): + | undefined +| FormOptions ``` ## Type Parameters @@ -23,7 +25,8 @@ function formOptions(defaultOpts?): undefined | FormO ## Returns -`undefined` \| [`FormOptions`](../interfaces/formoptions.md)\<`TFormData`, `TFormValidator`\> + \| `undefined` + \| [`FormOptions`](../interfaces/formoptions.md)\<`TFormData`, `TFormValidator`\> ## Defined in diff --git a/docs/reference/interfaces/fieldapioptions.md b/docs/reference/interfaces/fieldapioptions.md index 43a394b83..6b8e0a26e 100644 --- a/docs/reference/interfaces/fieldapioptions.md +++ b/docs/reference/interfaces/fieldapioptions.md @@ -17,7 +17,9 @@ An object type representing the required options for the FieldApi class. • **TName** *extends* [`DeepKeys`](../type-aliases/deepkeys.md)\<`TParentData`\> -• **TFieldValidator** *extends* `Validator`\<[`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined` +• **TFieldValidator** *extends* + \| `Validator`\<[`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>, `unknown`\> + \| `undefined` = `undefined` • **TFormValidator** *extends* `Validator`\<`TParentData`, `unknown`\> \| `undefined` = `undefined` diff --git a/docs/reference/interfaces/fieldlisteners.md b/docs/reference/interfaces/fieldlisteners.md index 937c14c6e..456504d06 100644 --- a/docs/reference/interfaces/fieldlisteners.md +++ b/docs/reference/interfaces/fieldlisteners.md @@ -11,7 +11,9 @@ title: FieldListeners • **TName** *extends* [`DeepKeys`](../type-aliases/deepkeys.md)\<`TParentData`\> -• **TFieldValidator** *extends* `Validator`\<[`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined` +• **TFieldValidator** *extends* + \| `Validator`\<[`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>, `unknown`\> + \| `undefined` = `undefined` • **TFormValidator** *extends* `Validator`\<`TParentData`, `unknown`\> \| `undefined` = `undefined` diff --git a/docs/reference/interfaces/fieldoptions.md b/docs/reference/interfaces/fieldoptions.md index b4044eeab..acd531820 100644 --- a/docs/reference/interfaces/fieldoptions.md +++ b/docs/reference/interfaces/fieldoptions.md @@ -17,7 +17,9 @@ An object type representing the options for a field in a form. • **TName** *extends* [`DeepKeys`](../type-aliases/deepkeys.md)\<`TParentData`\> -• **TFieldValidator** *extends* `Validator`\<[`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined` +• **TFieldValidator** *extends* + \| `Validator`\<[`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>, `unknown`\> + \| `undefined` = `undefined` • **TFormValidator** *extends* `Validator`\<`TParentData`, `unknown`\> \| `undefined` = `undefined` diff --git a/docs/reference/interfaces/fieldvalidators.md b/docs/reference/interfaces/fieldvalidators.md index e3770d3f8..f5b30904e 100644 --- a/docs/reference/interfaces/fieldvalidators.md +++ b/docs/reference/interfaces/fieldvalidators.md @@ -11,7 +11,9 @@ title: FieldValidators • **TName** *extends* [`DeepKeys`](../type-aliases/deepkeys.md)\<`TParentData`\> -• **TFieldValidator** *extends* `Validator`\<[`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined` +• **TFieldValidator** *extends* + \| `Validator`\<[`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>, `unknown`\> + \| `undefined` = `undefined` • **TFormValidator** *extends* `Validator`\<`TParentData`, `unknown`\> \| `undefined` = `undefined` diff --git a/docs/reference/type-aliases/baseformstate.md b/docs/reference/type-aliases/baseformstate.md index 277b5c0e7..bd43800cd 100644 --- a/docs/reference/type-aliases/baseformstate.md +++ b/docs/reference/type-aliases/baseformstate.md @@ -6,7 +6,7 @@ title: BaseFormState # Type Alias: BaseFormState\ ```ts -type BaseFormState: object; +type BaseFormState = object; ``` An object representing the current state of the form. diff --git a/docs/reference/type-aliases/deepkeys.md b/docs/reference/type-aliases/deepkeys.md index a97dd26a0..6bb3771a8 100644 --- a/docs/reference/type-aliases/deepkeys.md +++ b/docs/reference/type-aliases/deepkeys.md @@ -6,7 +6,7 @@ title: DeepKeys # Type Alias: DeepKeys\ ```ts -type DeepKeys: TDepth["length"] extends 5 ? never : unknown extends T ? PrefixFromDepth : T extends readonly any[] & IsTuple ? PrefixTupleAccessor, TDepth> : T extends any[] ? PrefixArrayAccessor : T extends Date ? never : T extends object ? PrefixObjectAccessor : T extends string | number | boolean | bigint ? "" : never; +type DeepKeys = TDepth["length"] extends 5 ? never : unknown extends T ? PrefixFromDepth : T extends readonly any[] & IsTuple ? PrefixTupleAccessor, TDepth> : T extends any[] ? PrefixArrayAccessor : T extends Date ? never : T extends object ? PrefixObjectAccessor : T extends string | number | boolean | bigint ? "" : never; ``` The keys of an object or array, deeply nested. diff --git a/docs/reference/type-aliases/deepvalue.md b/docs/reference/type-aliases/deepvalue.md index e2f765ee4..c78243e34 100644 --- a/docs/reference/type-aliases/deepvalue.md +++ b/docs/reference/type-aliases/deepvalue.md @@ -6,7 +6,7 @@ title: DeepValue # Type Alias: DeepValue\ ```ts -type DeepValue: unknown extends TValue ? TValue : TValue extends ReadonlyArray ? TAccessor extends `[${infer TBrackets}].${infer TAfter}` ? DeepValue, TAfter> : TAccessor extends `[${infer TBrackets}]` ? DeepValue : TAccessor extends keyof TValue ? TValue[TAccessor] : TValue[TAccessor & number] : TValue extends Record ? TAccessor extends `${infer TBefore}[${infer TEverythingElse}` ? DeepValue, `[${TEverythingElse}`> : TAccessor extends `[${infer TBrackets}]` ? DeepValue : TAccessor extends `${infer TBefore}.${infer TAfter}` ? DeepValue, TAfter> : TAccessor extends string ? TNullable extends true ? Nullable : TValue[TAccessor] : never : never; +type DeepValue = unknown extends TValue ? TValue : TValue extends ReadonlyArray ? TAccessor extends `[${infer TBrackets}].${infer TAfter}` ? DeepValue, TAfter> : TAccessor extends `[${infer TBrackets}]` ? DeepValue : TAccessor extends keyof TValue ? TValue[TAccessor] : TValue[TAccessor & number] : TValue extends Record ? TAccessor extends `${infer TBefore}[${infer TEverythingElse}` ? DeepValue, `[${TEverythingElse}`> : TAccessor extends `[${infer TBrackets}]` ? DeepValue : TAccessor extends `${infer TBefore}.${infer TAfter}` ? DeepValue, TAfter> : TAccessor extends string ? TNullable extends true ? Nullable : TValue[TAccessor] : never : never; ``` Infer the type of a deeply nested property within an object or an array. diff --git a/docs/reference/type-aliases/derivedformstate.md b/docs/reference/type-aliases/derivedformstate.md index 59a7579b7..06330c130 100644 --- a/docs/reference/type-aliases/derivedformstate.md +++ b/docs/reference/type-aliases/derivedformstate.md @@ -6,7 +6,7 @@ title: DerivedFormState # Type Alias: DerivedFormState\ ```ts -type DerivedFormState: object; +type DerivedFormState = object; ``` ## Type Parameters diff --git a/docs/reference/type-aliases/fieldinfo.md b/docs/reference/type-aliases/fieldinfo.md index 55b60f198..e91201f44 100644 --- a/docs/reference/type-aliases/fieldinfo.md +++ b/docs/reference/type-aliases/fieldinfo.md @@ -6,7 +6,7 @@ title: FieldInfo # Type Alias: FieldInfo\ ```ts -type FieldInfo: object; +type FieldInfo = object; ``` An object representing the field information for a specific field within the form. @@ -22,7 +22,9 @@ An object representing the field information for a specific field within the for ### instance ```ts -instance: FieldApi | undefined, TFormValidator> | null; +instance: + | FieldApi | undefined, TFormValidator> + | null; ``` An instance of the FieldAPI. diff --git a/docs/reference/type-aliases/fieldmeta.md b/docs/reference/type-aliases/fieldmeta.md index 2984539a8..bc06a48f6 100644 --- a/docs/reference/type-aliases/fieldmeta.md +++ b/docs/reference/type-aliases/fieldmeta.md @@ -6,7 +6,7 @@ title: FieldMeta # Type Alias: FieldMeta ```ts -type FieldMeta: FieldMetaBase & FieldMetaDerived; +type FieldMeta = FieldMetaBase & FieldMetaDerived; ``` An object type representing the metadata of a field in a form. diff --git a/docs/reference/type-aliases/fieldmetabase.md b/docs/reference/type-aliases/fieldmetabase.md index 763e9fca8..acb8e5088 100644 --- a/docs/reference/type-aliases/fieldmetabase.md +++ b/docs/reference/type-aliases/fieldmetabase.md @@ -6,7 +6,7 @@ title: FieldMetaBase # Type Alias: FieldMetaBase ```ts -type FieldMetaBase: object; +type FieldMetaBase = object; ``` ## Type declaration diff --git a/docs/reference/type-aliases/fieldmetaderived.md b/docs/reference/type-aliases/fieldmetaderived.md index 54edb3bdb..8f5dcb43c 100644 --- a/docs/reference/type-aliases/fieldmetaderived.md +++ b/docs/reference/type-aliases/fieldmetaderived.md @@ -6,7 +6,7 @@ title: FieldMetaDerived # Type Alias: FieldMetaDerived ```ts -type FieldMetaDerived: object; +type FieldMetaDerived = object; ``` ## Type declaration diff --git a/docs/reference/type-aliases/fieldserrormapfromvalidator.md b/docs/reference/type-aliases/fieldserrormapfromvalidator.md index 874056b36..91a721207 100644 --- a/docs/reference/type-aliases/fieldserrormapfromvalidator.md +++ b/docs/reference/type-aliases/fieldserrormapfromvalidator.md @@ -6,7 +6,7 @@ title: FieldsErrorMapFromValidator # Type Alias: FieldsErrorMapFromValidator\ ```ts -type FieldsErrorMapFromValidator: Partial, ValidationErrorMap>>; +type FieldsErrorMapFromValidator = Partial, ValidationErrorMap>>; ``` ## Type Parameters diff --git a/docs/reference/type-aliases/fieldstate.md b/docs/reference/type-aliases/fieldstate.md index 3054b5c63..e06cd7ce5 100644 --- a/docs/reference/type-aliases/fieldstate.md +++ b/docs/reference/type-aliases/fieldstate.md @@ -6,7 +6,7 @@ title: FieldState # Type Alias: FieldState\ ```ts -type FieldState: object; +type FieldState = object; ``` An object type representing the state of a field. diff --git a/docs/reference/type-aliases/formstate.md b/docs/reference/type-aliases/formstate.md index 69f519257..862f9880f 100644 --- a/docs/reference/type-aliases/formstate.md +++ b/docs/reference/type-aliases/formstate.md @@ -6,7 +6,7 @@ title: FormState # Type Alias: FormState\ ```ts -type FormState: BaseFormState & DerivedFormState; +type FormState = BaseFormState & DerivedFormState; ``` ## Type Parameters diff --git a/docs/reference/type-aliases/formvalidatefn.md b/docs/reference/type-aliases/formvalidatefn.md index 097d4837a..59d07a83d 100644 --- a/docs/reference/type-aliases/formvalidatefn.md +++ b/docs/reference/type-aliases/formvalidatefn.md @@ -6,7 +6,7 @@ title: FormValidateFn # Type Alias: FormValidateFn()\ ```ts -type FormValidateFn: (props) => FormValidationError; +type FormValidateFn = (props) => FormValidationError; ``` ## Type Parameters diff --git a/docs/reference/type-aliases/formvalidator.md b/docs/reference/type-aliases/formvalidator.md index e2cde55da..08e23baf6 100644 --- a/docs/reference/type-aliases/formvalidator.md +++ b/docs/reference/type-aliases/formvalidator.md @@ -6,7 +6,7 @@ title: FormValidator # Type Alias: FormValidator\ ```ts -type FormValidator: object; +type FormValidator = object; ``` ## Type Parameters diff --git a/docs/reference/type-aliases/standardschemav1.md b/docs/reference/type-aliases/standardschemav1.md index e97df86f6..689bb4374 100644 --- a/docs/reference/type-aliases/standardschemav1.md +++ b/docs/reference/type-aliases/standardschemav1.md @@ -6,7 +6,7 @@ title: StandardSchemaV1 # Type Alias: StandardSchemaV1\ ```ts -type StandardSchemaV1: object; +type StandardSchemaV1 = object; ``` The Standard Schema interface. diff --git a/docs/reference/type-aliases/updater.md b/docs/reference/type-aliases/updater.md index 01f7919da..51627a938 100644 --- a/docs/reference/type-aliases/updater.md +++ b/docs/reference/type-aliases/updater.md @@ -6,7 +6,7 @@ title: Updater # Type Alias: Updater\ ```ts -type Updater: TOutput | UpdaterFn; +type Updater = TOutput | UpdaterFn; ``` ## Type Parameters diff --git a/docs/reference/type-aliases/updaterfn.md b/docs/reference/type-aliases/updaterfn.md index 0bbd22e59..475be7b9d 100644 --- a/docs/reference/type-aliases/updaterfn.md +++ b/docs/reference/type-aliases/updaterfn.md @@ -6,7 +6,7 @@ title: UpdaterFn # Type Alias: UpdaterFn()\ ```ts -type UpdaterFn: (input) => TOutput; +type UpdaterFn = (input) => TOutput; ``` ## Type Parameters diff --git a/docs/reference/type-aliases/validationerror.md b/docs/reference/type-aliases/validationerror.md index a36d1d03f..15ed53631 100644 --- a/docs/reference/type-aliases/validationerror.md +++ b/docs/reference/type-aliases/validationerror.md @@ -6,7 +6,7 @@ title: ValidationError # Type Alias: ValidationError ```ts -type ValidationError: undefined | false | null | string; +type ValidationError = undefined | false | null | string; ``` ## Defined in diff --git a/docs/reference/type-aliases/validationmeta.md b/docs/reference/type-aliases/validationmeta.md index 31eb09f9f..2ab5dcb7f 100644 --- a/docs/reference/type-aliases/validationmeta.md +++ b/docs/reference/type-aliases/validationmeta.md @@ -6,7 +6,7 @@ title: ValidationMeta # Type Alias: ValidationMeta ```ts -type ValidationMeta: object; +type ValidationMeta = object; ``` An object representing the validation metadata for a field. Not intended for public usage. diff --git a/docs/reference/type-aliases/validationsource.md b/docs/reference/type-aliases/validationsource.md index af0b0a62a..3a97a531a 100644 --- a/docs/reference/type-aliases/validationsource.md +++ b/docs/reference/type-aliases/validationsource.md @@ -6,7 +6,7 @@ title: ValidationSource # Type Alias: ValidationSource ```ts -type ValidationSource: "form" | "field"; +type ValidationSource = "form" | "field"; ``` ## Defined in