react-final-form
react-final-form copied to clipboard
Mapped type over FormProps is `{[string]: any}` since 6.5.2
This commit https://github.com/final-form/react-final-form/issues/864 introduced a breaking change for TypeScript users because now mapped types over FormProps return a dictionary of any.
For example:
type FinalFormWrapperProps<
FormValues extends object = Record<string, any>,
InitialFormValues = Partial<FormValues>
> = Omit<FormProps<FormValues, InitialFormValues>, 'validate'>;
Result before this commit:

After:

TypeScript 4.0.3 final-form 4.20.1 react-final-form 6.5.2
Yeah same. I just upgraded and had to patch that line out.
Oh no. This really prevents a ton of important use cases. See https://stackoverflow.com/questions/70525203/omit-react-componentprops-and-react-final-forms-fieldprops-produce-an-unexpec
Can we go back to how things were? Is that an option?