Skip to content

Commit

Permalink
Export a type definition for the ValidationError constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Apr 9, 2022
1 parent 1b247fa commit 448ddc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ export declare const Joi: joiRoot;

export declare function validate(schema: schema, options?: EvOptions, joiRoot?: ValidationOptions): RequestHandler;

export class ValidationError {
export declare class ValidationError extends Error {
name: string;
message: string;
statusCode: number;
error: string;
details: errors;
constructor(errors: errors, options: object);
}

0 comments on commit 448ddc4

Please sign in to comment.