Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/angular-form/src/tanstack-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ export class TanStackField<
TFormOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>,
TSubmitMeta,
> implements OnInit
{
> implements OnInit {
name = input.required<TName>()
defaultValue = input<NoInfer<TData>>()
asyncDebounceMs = input(undefined as never as number, {
Expand Down
26 changes: 13 additions & 13 deletions packages/form-core/src/FieldApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,19 +535,19 @@ export interface FieldApiOptions<
in out TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>,
in out TParentSubmitMeta,
> extends FieldOptions<
TParentData,
TName,
TData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync
> {
TParentData,
TName,
TData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync
> {
form: FormApi<
TParentData,
TFormOnMount,
Expand Down
3 changes: 1 addition & 2 deletions packages/form-core/src/FieldGroupApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ export class FieldGroupApi<
in out TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
in out TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
in out TSubmitMeta = never,
> implements FieldManipulator<TFieldGroupData, TSubmitMeta>
{
> implements FieldManipulator<TFieldGroupData, TSubmitMeta> {
/**
* The form that called this field group.
*/
Expand Down
11 changes: 6 additions & 5 deletions packages/form-core/src/FormApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,9 @@ export interface FormState<
in out TOnDynamic extends undefined | FormValidateOrFn<TFormData>,
in out TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
in out TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
> extends BaseFormState<
>
extends
BaseFormState<
TFormData,
TOnMount,
TOnChange,
Expand Down Expand Up @@ -890,8 +892,7 @@ export class FormApi<
in out TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
in out TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
in out TSubmitMeta = never,
> implements FieldManipulator<TFormData, TSubmitMeta>
{
> implements FieldManipulator<TFormData, TSubmitMeta> {
/**
* The options for the form.
*/
Expand Down Expand Up @@ -1179,8 +1180,8 @@ export class FormApi<
const hasOnMountError = Boolean(
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
currBaseStore.errorMap?.onMount ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
fieldMetaValues.some((f) => f?.errorMap?.onMount),
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
fieldMetaValues.some((f) => f?.errorMap?.onMount),
)

const isValidating = !!isFieldsValidating
Expand Down
5 changes: 3 additions & 2 deletions packages/form-core/src/util-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ export type DeepKeyAndValueObject<
export type UnknownAccessor<TParent extends AnyDeepKeyAndValue> =
TParent['key'] extends never ? string : `${TParent['key']}.${string}`

export interface UnknownDeepKeyAndValue<TParent extends AnyDeepKeyAndValue>
extends AnyDeepKeyAndValue {
export interface UnknownDeepKeyAndValue<
TParent extends AnyDeepKeyAndValue,
> extends AnyDeepKeyAndValue {
key: UnknownAccessor<TParent>
value: unknown
}
Expand Down
3 changes: 1 addition & 2 deletions packages/lit-form/src/tanstack-form-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ export class TanStackFormController<
TFormOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>,
TSubmitMeta,
> implements ReactiveController
{
> implements ReactiveController {
#host: ReactiveControllerHost
#subscription?: () => void

Expand Down
26 changes: 13 additions & 13 deletions packages/react-form-nextjs/src/createServerValidate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ interface CreateServerValidateOptions<
TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
TSubmitMeta,
> extends FormOptions<
TFormData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync,
TOnServer,
TSubmitMeta
> {
TFormData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync,
TOnServer,
TSubmitMeta
> {
onServerValidate: TOnServer
}

Expand Down
6 changes: 3 additions & 3 deletions packages/react-form-nextjs/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ interface ServerValidateErrorState<
}

export class ServerValidateError<
TFormData,
TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
>
TFormData,
TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
>
extends Error
implements ServerValidateErrorState<TFormData, TOnServer>
{
Expand Down
26 changes: 13 additions & 13 deletions packages/react-form-remix/src/createServerValidate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ interface CreateServerValidateOptions<
TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
TSubmitMeta,
> extends FormOptions<
TFormData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync,
TOnServer,
TSubmitMeta
> {
TFormData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync,
TOnServer,
TSubmitMeta
> {
onServerValidate: TOnServer
}

Expand Down
6 changes: 3 additions & 3 deletions packages/react-form-remix/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ interface ServerValidateErrorState<
}

export class ServerValidateError<
TFormData,
TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
>
TFormData,
TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
>
extends Error
implements ServerValidateErrorState<TFormData, TOnServer>
{
Expand Down
26 changes: 13 additions & 13 deletions packages/react-form-start/src/createServerValidate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ interface CreateServerValidateOptions<
TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
TSubmitMeta,
> extends FormOptions<
TFormData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync,
TOnServer,
TSubmitMeta
> {
TFormData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync,
TOnServer,
TSubmitMeta
> {
onServerValidate: TOnServer
}

Expand Down
6 changes: 3 additions & 3 deletions packages/react-form-start/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ interface ServerValidateErrorState<
}

export class ServerValidateError<
TFormData,
TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
>
TFormData,
TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
>
extends Error
implements ServerValidateErrorState<TFormData, TOnServer>
{
Expand Down
26 changes: 13 additions & 13 deletions packages/react-form/src/createFormHook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,19 +214,19 @@ export interface WithFormProps<
TFormComponents extends Record<string, ComponentType<any>>,
TRenderProps extends object = Record<string, never>,
> extends FormOptions<
TFormData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync,
TOnServer,
TSubmitMeta
> {
TFormData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync,
TOnServer,
TSubmitMeta
> {
// Optional, but adds props to the `render` function outside of `form`
props?: TRenderProps
render: FunctionComponent<
Expand Down
8 changes: 6 additions & 2 deletions packages/react-form/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export interface UseFieldOptions<
TFormOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>,
TSubmitMeta,
> extends FieldApiOptions<
>
extends
FieldApiOptions<
TParentData,
TName,
TData,
Expand Down Expand Up @@ -97,7 +99,9 @@ export interface UseFieldOptionsBound<
TOnDynamicAsync extends
| undefined
| FieldAsyncValidateOrFn<TParentData, TName, TData>,
> extends FieldOptions<
>
extends
FieldOptions<
TParentData,
TName,
TData,
Expand Down
74 changes: 37 additions & 37 deletions packages/react-form/src/useField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,30 +292,30 @@ interface FieldComponentProps<
TPatentSubmitMeta,
ExtendedApi = {},
> extends UseFieldOptions<
TParentData,
TName,
TData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync,
TFormOnMount,
TFormOnChange,
TFormOnChangeAsync,
TFormOnBlur,
TFormOnBlurAsync,
TFormOnSubmit,
TFormOnSubmitAsync,
TFormOnDynamic,
TFormOnDynamicAsync,
TFormOnServer,
TPatentSubmitMeta
> {
TParentData,
TName,
TData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync,
TFormOnMount,
TFormOnChange,
TFormOnChangeAsync,
TFormOnBlur,
TFormOnBlurAsync,
TFormOnSubmit,
TFormOnSubmitAsync,
TFormOnDynamic,
TFormOnDynamicAsync,
TFormOnServer,
TPatentSubmitMeta
> {
children: (
fieldApi: FieldApi<
TParentData,
Expand Down Expand Up @@ -380,19 +380,19 @@ interface FieldComponentBoundProps<
TPatentSubmitMeta,
ExtendedApi = {},
> extends UseFieldOptionsBound<
TParentData,
TName,
TData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync
> {
TParentData,
TName,
TData,
TOnMount,
TOnChange,
TOnChangeAsync,
TOnBlur,
TOnBlurAsync,
TOnSubmit,
TOnSubmitAsync,
TOnDynamic,
TOnDynamicAsync
> {
children: (
fieldApi: FieldApi<
TParentData,
Expand Down
Loading
Loading