From 6d280740c244b59727f2e6aa6e12dfc8160f3159 Mon Sep 17 00:00:00 2001 From: Marko Schilde Date: Fri, 24 Aug 2018 14:40:31 +0200 Subject: [PATCH] mixing sync and async validators is allowed --- 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 90bb04747f..11d095e4a2 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -976,8 +976,8 @@ declare module "mongoose" { */ validate?: RegExp | [RegExp, string] | SchemaTypeOpts.ValidateFn | [SchemaTypeOpts.ValidateFn, string] | - SchemaTypeOpts.ValidateOpts | SchemaTypeOpts.ValidateOpts[] | - SchemaTypeOpts.AsyncValidateOpts | SchemaTypeOpts.AsyncValidateOpts[]; + SchemaTypeOpts.ValidateOpts | SchemaTypeOpts.AsyncValidateOpts | + (SchemaTypeOpts.ValidateOpts | SchemaTypeOpts.AsyncValidateOpts)[]; /** Declares an unique index. */ unique?: boolean | any;