From 6369c3367b79452e1a7403fea3a23693fa136afa Mon Sep 17 00:00:00 2001 From: jcqvisser Date: Mon, 14 Nov 2022 13:09:36 +0200 Subject: [PATCH] update ErrorSchema type --- packages/utils/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/src/types.ts b/packages/utils/src/types.ts index 6e08850770..6189762689 100644 --- a/packages/utils/src/types.ts +++ b/packages/utils/src/types.ts @@ -116,7 +116,7 @@ export type FieldErrors = { /** Type describing a recursive structure of `FieldErrors`s for an object with a non-empty set of keys */ export type ErrorSchema = FieldErrors & { /** The set of errors for fields in the recursive object structure */ - [key in keyof T]?: ErrorSchema; + [key in keyof T]?: ErrorSchema | FieldErrors; }; /** Type that describes the list of errors for a field being actively validated by a custom validator */