diff --git a/joi/index.d.ts b/joi/index.d.ts index ece6bb6d62..c192f49dd1 100644 --- a/joi/index.d.ts +++ b/joi/index.d.ts @@ -121,10 +121,10 @@ export interface IPOptions { } export interface ValidationError extends Error { - message: string; + isJoi: boolean; details: ValidationErrorItem[]; - simple(): string; - annotated(): string; + annotate(): string; + _object: any; } export interface ValidationErrorItem { @@ -132,6 +132,7 @@ export interface ValidationErrorItem { type: string; path: string; options?: ValidationOptions; + context?: any; } export interface ValidationResult { diff --git a/joi/joi-tests.ts b/joi/joi-tests.ts index eb0f147f78..759be529ad 100644 --- a/joi/joi-tests.ts +++ b/joi/joi-tests.ts @@ -125,7 +125,8 @@ validErrItem = { message: str, type: str, path: str, - options: validOpts + options: validOpts, + context: obj }; // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---