diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index d9f9d789f0..b8992e60f5 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -1422,9 +1422,9 @@ declare module "mongoose" { * Executes registered validation rules (skipping asynchronous validators) for this document. * This method is useful if you need synchronous validation. * @param pathsToValidate only validate the given paths - * @returns MongooseError if there are errors during validation, or undefined if there is no error. + * @returns ValidationError if there are errors during validation, or undefined if there is no error. */ - validateSync(pathsToValidate?: string | string[]): Error; + validateSync(pathsToValidate?: string | string[]): Error.ValidationError; /** Hash containing current validation errors. */ errors: any;