Skip to content

Commit 0cce812

Browse files
committed
fix: allow any.error() return type to be ErrorReport[]
1 parent b655785 commit 0cce812

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ declare namespace Joi {
693693
context?: Context;
694694
}
695695

696-
type ValidationErrorFunction = (errors: ErrorReport[]) => string | ValidationErrorItem | Error;
696+
type ValidationErrorFunction = (errors: ErrorReport[]) => string | ValidationErrorItem | Error | ErrorReport[];
697697

698698
interface ValidationWarning {
699699
message: string;

0 commit comments

Comments
 (0)