@@ -96,7 +96,12 @@ export function useForm<
9696 } ) ;
9797 const stateSnapshot = useFormState ( context , subjectRef ) ;
9898 const noValidate = useNoValidate ( options . defaultNoValidate ) ;
99- const form = getFormMetadata ( context , subjectRef , stateSnapshot , noValidate ) ;
99+ const form = getFormMetadata < Schema , FormError , FormValue > (
100+ context ,
101+ subjectRef ,
102+ stateSnapshot ,
103+ noValidate ,
104+ ) ;
100105
101106 useEffect ( ( ) => {
102107 context . runSideEffect ( stateSnapshot . pendingIntents ) ;
@@ -119,12 +124,17 @@ export function useFormMetadata<
119124 const stateSnapshot = useFormState ( context , subjectRef ) ;
120125 const noValidate = useNoValidate ( options . defaultNoValidate ) ;
121126
122- return getFormMetadata ( context , subjectRef , stateSnapshot , noValidate ) ;
127+ return getFormMetadata < Schema , FormError , unknown > (
128+ context ,
129+ subjectRef ,
130+ stateSnapshot ,
131+ noValidate ,
132+ ) ;
123133}
124134
125135export function useField <
126136 FieldSchema ,
127- FormSchema extends Record < string , unknown > = Record < string , unknown > ,
137+ FormSchema extends Record < string , unknown > = any ,
128138 FormError = string [ ] ,
129139> (
130140 name : FieldName < FieldSchema , FormSchema , FormError > ,
@@ -144,7 +154,12 @@ export function useField<
144154 stateSnapshot ,
145155 name ,
146156 ) ;
147- const form = getFormMetadata ( context , subjectRef , stateSnapshot , false ) ;
157+ const form = getFormMetadata < FormSchema , FormError , unknown > (
158+ context ,
159+ subjectRef ,
160+ stateSnapshot ,
161+ false ,
162+ ) ;
148163
149164 return [ field , form ] ;
150165}
0 commit comments