File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,9 @@ const parseErrorSchema = (
43
43
} ;
44
44
45
45
export function yupResolver < TFieldValues extends FieldValues > (
46
- schema : Yup . ObjectSchema < TFieldValues > | ReturnType < typeof Yup . lazy > ,
46
+ schema :
47
+ | Yup . ObjectSchema < TFieldValues >
48
+ | ReturnType < typeof Yup . lazy < Yup . ObjectSchema < TFieldValues > > > ,
47
49
schemaOptions : Parameters < ( typeof schema ) [ 'validate' ] > [ 1 ] = { } ,
48
50
resolverOptions : {
49
51
/**
@@ -56,7 +58,7 @@ export function yupResolver<TFieldValues extends FieldValues>(
56
58
*/
57
59
raw ?: boolean ;
58
60
} = { } ,
59
- ) : Resolver < TFieldValues > {
61
+ ) : Resolver < Yup . InferType < typeof schema > > {
60
62
return async ( values , context , options ) => {
61
63
try {
62
64
if ( schemaOptions . context && process . env . NODE_ENV === 'development' ) {
You can’t perform that action at this time.
0 commit comments