From 0cce8120d1c5d85e8ccb61107c310e78e8baabb5 Mon Sep 17 00:00:00 2001 From: Nicolas Morel Date: Thu, 31 Aug 2023 17:44:23 +0200 Subject: [PATCH] fix: allow any.error() return type to be ErrorReport[] --- lib/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index 2eca7ac2..da367a91 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -693,7 +693,7 @@ declare namespace Joi { context?: Context; } - type ValidationErrorFunction = (errors: ErrorReport[]) => string | ValidationErrorItem | Error; + type ValidationErrorFunction = (errors: ErrorReport[]) => string | ValidationErrorItem | Error | ErrorReport[]; interface ValidationWarning { message: string;