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
I have this mostly working, except I am getting the following TypeScript error on the initialValues property:
Type 'I' is not assignable to type 'MaybeRef<PartialDeep<I, {}> | null | undefined>'.
Type 'Record<string, any>' is not assignable to type 'MaybeRef<PartialDeep<I, {}> | null | undefined>'.ts(2322)
Any idea how to resolve this TypeScript error?
It must be something to do with the generic, because if I remove that and type _initialValues to TestValues the error goes away.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi! I'm trying to create a function that does the following:
_initialValues
) as an argument with a generic type_initialValues
argument touseForm
in its options'initialValues
propertyvalues
from the created FormContext, withvalues
retaining the generic type of_initialValues
Here is a reduced test case:
I have this mostly working, except I am getting the following TypeScript error on the
initialValues
property:Any idea how to resolve this TypeScript error?
It must be something to do with the generic, because if I remove that and type
_initialValues
toTestValues
the error goes away.TIA!
Beta Was this translation helpful? Give feedback.
All reactions