Skip to content

Commit

Permalink
close #8749 field errors mapper to extends Date type
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebill1049 committed Jul 28, 2022
1 parent ed80ce9 commit 187e328
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/types/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export type DeepRequired<T> = {
};

export type FieldErrorsImpl<T extends FieldValues = FieldValues> = {
[K in keyof T]?: T[K] extends object
[K in keyof T]?: T[K] extends Date | FileList | File | Blob
? FieldError
: T[K] extends object
? Merge<FieldError, FieldErrorsImpl<T[K]>>
: FieldError;
};
Expand Down

0 comments on commit 187e328

Please sign in to comment.