From c49904aa71bcbc204173141a782a1b2dedf3eff2 Mon Sep 17 00:00:00 2001 From: JulioJu Date: Tue, 12 Feb 2019 02:16:55 +0100 Subject: [PATCH] @types/mongoose update(): add option multipleCastError source: https://github.com/Automattic/mongoose/pull/7513 --- types/mongoose/index.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index d9f9d789f0..e7fa6c1bf4 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -2254,6 +2254,11 @@ declare module "mongoose" { * functions that update validation runs. Does nothing if runValidators is false. */ context?: string; + /** + * by default, mongoose only returns the first error that occurred in casting the query. + * Turn on this option to aggregate all the cast errors. + */ + multipleCastError?: boolean; } interface QueryUpdateOptions extends ModelUpdateOptions { @@ -3361,6 +3366,11 @@ declare module "mongoose" { overwrite?: boolean; /** other options */ [other: string]: any; + /** + * by default, mongoose only returns the first error that occurred in casting the query. + * Turn on this option to aggregate all the cast errors. + */ + multipleCastError?: boolean; } interface ModelMapReduceOption {