Hello, I am trying to create a context for a generic AppForm.
If the form has a field which may be a JS File object, the following type error is shown:
error TS2322: Type 'AppFieldExtendedReactFormApi<{ firstName: string; formMode: FormMode; formFile: File | null; }, FormValidateOrFn<{ firstName: string; formMode: FormMode; formFile: File | null; }> | undefined, ... 11 more ..., {}>' is not assignable to type 'AppFieldExtendedReactFormApi<any, any, any, any, any, any, any, any, any, any, any, any, { readonly TextInput: ({ ...props }: DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => Element; }, {}>'.
Types of property 'pushFieldValue' are incompatible.
Type '<TField extends never>(field: TField, value: (TField extends "formMode" | "firstName" | "formFile" | "formFile.text" | `formFile.text.${string}` | "formFile.name" | "formFile.size" | "formFile.type" | ... 9 more ... | `formFile.stream.${string}` ? DeepRecord<...>[TField] : never) extends any[] ? (any[] & (TField ext...' is not assignable to type '<TField extends never>(field: TField, value: any, options?: UpdateMetaOptions | undefined) => void'.
Types of parameters 'value' and 'value' are incompatible.
Type 'any' is not assignable to type 'never'.
Describe the bug
Hello, I am trying to create a context for a generic AppForm.
If the form has a field which may be a JS File object, the following type error is shown:
Please see the stackblitz example for the full set up
Your minimal, reproducible example
https://stackblitz.com/edit/tanstack-form-zz8oewgu
Steps to reproduce
Expected behavior
No type error should be raised
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
TanStack Form adapter
None
TanStack Form version
1.29.1
TypeScript version
6.0.2
Additional context
No response