From b8aa2092c9552c02fe5f5d3efb085c0853343f1c Mon Sep 17 00:00:00 2001 From: Simon Tretter Date: Mon, 9 Oct 2023 10:46:31 +0200 Subject: [PATCH 1/2] Update models.d.ts --- types/models.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/models.d.ts b/types/models.d.ts index a3e315ad05b..e74754f0710 100644 --- a/types/models.d.ts +++ b/types/models.d.ts @@ -32,7 +32,9 @@ declare module 'mongoose' { PopulateOption, SessionOption { limit?: number; + // @deprecated, use includeResultMetadata instead rawResult?: boolean; + includeResultMetadata?: boolean; ordered?: boolean; lean?: boolean; throwOnValidationError?: boolean; From d2fec37c122eeb5ef43f86801560875790f7fc5a Mon Sep 17 00:00:00 2001 From: Simon Tretter Date: Mon, 9 Oct 2023 10:48:15 +0200 Subject: [PATCH 2/2] Update query.d.ts --- types/query.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/query.d.ts b/types/query.d.ts index 3963481a20b..1d66e75221c 100644 --- a/types/query.d.ts +++ b/types/query.d.ts @@ -124,9 +124,14 @@ declare module 'mongoose' { overwriteDiscriminatorKey?: boolean; projection?: ProjectionType; /** + * @deprecated use includeResultMetadata instead. * if true, returns the raw result from the MongoDB driver */ rawResult?: boolean; + /** + * if ture, includes meta data for the result from the MongoDB driver + */ + includeResultMetadata?: boolean; readPreference?: string | mongodb.ReadPreferenceMode; /** * An alias for the `new` option. `returnOriginal: false` is equivalent to `new: true`.