From 3722ab1c968df9bb15e5b23bd68fe54e56098b20 Mon Sep 17 00:00:00 2001 From: JulioJu Date: Sat, 9 Feb 2019 10:08:24 +0100 Subject: [PATCH] @types/mongoose : validateSync returns ValidationError source: https://github.com/Automattic/mongoose/pull/7499#event-2127372731 --- types/mongoose/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;