Skip to content

Commit

Permalink
Merge pull request #13955 from simllll/patch-7
Browse files Browse the repository at this point in the history
type: add types for includeResultMetadata
  • Loading branch information
vkarpov15 committed Oct 9, 2023
2 parents d96f505 + d2fec37 commit d7c832e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/models.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions types/query.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,14 @@ declare module 'mongoose' {
overwriteDiscriminatorKey?: boolean;
projection?: ProjectionType<DocType>;
/**
* @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`.
Expand Down

0 comments on commit d7c832e

Please sign in to comment.