From 786a406b0cecdadab222ce76977bc78bf16f4d59 Mon Sep 17 00:00:00 2001 From: Abdelrahman Omran Date: Thu, 20 Jul 2023 13:37:53 +0200 Subject: [PATCH] Add inline comment to mainly tell the default value of the runValidator option in the QueryOptions interface --- types/query.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/query.d.ts b/types/query.d.ts index e60846e60a6..0958e30dc9b 100644 --- a/types/query.d.ts +++ b/types/query.d.ts @@ -136,6 +136,10 @@ declare module 'mongoose' { * Another alias for the `new` option. `returnOriginal` is deprecated so this should be used. */ returnDocument?: 'before' | 'after'; + /** + * Set to true to enable `update validators` + * (https://mongoosejs.com/docs/validation.html#update-validators). Defaults to false. + */ runValidators?: boolean; /* Set to `true` to automatically sanitize potentially unsafe user-generated query projections */ sanitizeProjection?: boolean;