Skip to content

Commit

Permalink
fix: allow any.error() return type to be ErrorReport[]
Browse files Browse the repository at this point in the history
  • Loading branch information
Marsup committed Aug 31, 2023
1 parent b655785 commit 0cce812
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0cce812

Please sign in to comment.