You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by AndresDJonge December 6, 2024
Hi all! I've got an issue with TypeScript when I'm trying to pass the form to a child component. I remember I could do this without a problem with the regular react-hook-form but now I've got this problems. Let's take an example:
The TS Error I get is: Types of property register are incompatible. Type '(name: "action" | "email" | "password", options?: (RegisterOptions<{ action: Action; email: string; password: string; }> & { disableProgressiveEnhancement?: boolean | undefined; }) | undefined) => { ...; }' is not assignable to type '(name: string, options?: (RegisterOptions<FieldValues> & { disableProgressiveEnhancement?: boolean | undefined; }) | undefined) => { defaultValue?: string | undefined; ... 11 more ...; disabled?: boolean | undefined; }'. Types of parameters name and name are incompatible. Type string is not assignable to type 'action' | 'email' | 'password'
The text was updated successfully, but these errors were encountered:
Discussed in #133
Originally posted by AndresDJonge December 6, 2024
Hi all! I've got an issue with TypeScript when I'm trying to pass the form to a child component. I remember I could do this without a problem with the regular react-hook-form but now I've got this problems. Let's take an example:
The TS Error I get is:
Types of property register are incompatible. Type '(name: "action" | "email" | "password", options?: (RegisterOptions<{ action: Action; email: string; password: string; }> & { disableProgressiveEnhancement?: boolean | undefined; }) | undefined) => { ...; }' is not assignable to type '(name: string, options?: (RegisterOptions<FieldValues> & { disableProgressiveEnhancement?: boolean | undefined; }) | undefined) => { defaultValue?: string | undefined; ... 11 more ...; disabled?: boolean | undefined; }'. Types of parameters name and name are incompatible. Type string is not assignable to type 'action' | 'email' | 'password'
The text was updated successfully, but these errors were encountered: