Skip to content

Commit d7c832e

Browse files
authored
Merge pull request #13955 from simllll/patch-7
type: add types for includeResultMetadata
2 parents d96f505 + d2fec37 commit d7c832e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

types/models.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ declare module 'mongoose' {
3232
PopulateOption,
3333
SessionOption {
3434
limit?: number;
35+
// @deprecated, use includeResultMetadata instead
3536
rawResult?: boolean;
37+
includeResultMetadata?: boolean;
3638
ordered?: boolean;
3739
lean?: boolean;
3840
throwOnValidationError?: boolean;

types/query.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,14 @@ declare module 'mongoose' {
124124
overwriteDiscriminatorKey?: boolean;
125125
projection?: ProjectionType<DocType>;
126126
/**
127+
* @deprecated use includeResultMetadata instead.
127128
* if true, returns the raw result from the MongoDB driver
128129
*/
129130
rawResult?: boolean;
131+
/**
132+
* if ture, includes meta data for the result from the MongoDB driver
133+
*/
134+
includeResultMetadata?: boolean;
130135
readPreference?: string | mongodb.ReadPreferenceMode;
131136
/**
132137
* An alias for the `new` option. `returnOriginal: false` is equivalent to `new: true`.

0 commit comments

Comments
 (0)