Skip to content

Commit

Permalink
Merge pull request #14737 from hasezoey/7xFixQueryFind
Browse files Browse the repository at this point in the history
types(query): fix usage of "RawDocType" where "DocType" should be passed
  • Loading branch information
vkarpov15 authored Jul 11, 2024
2 parents 061bb82 + 1ced015 commit 0c65a53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/query.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ declare module 'mongoose' {
): QueryWithHelpers<Array<DocType>, DocType, THelpers, RawDocType, 'find'>;
find(
filter: FilterQuery<RawDocType>
): QueryWithHelpers<Array<RawDocType>, DocType, THelpers, RawDocType, 'find'>;
): QueryWithHelpers<Array<DocType>, DocType, THelpers, RawDocType, 'find'>;
find(): QueryWithHelpers<Array<DocType>, DocType, THelpers, RawDocType, 'find'>;

/** Declares the query a findOne operation. When executed, returns the first found document. */
Expand All @@ -389,7 +389,7 @@ declare module 'mongoose' {
): QueryWithHelpers<DocType | null, DocType, THelpers, RawDocType, 'findOne'>;
findOne(
filter?: FilterQuery<RawDocType>
): QueryWithHelpers<DocType | null, RawDocType, THelpers, RawDocType, 'findOne'>;
): QueryWithHelpers<DocType | null, DocType, THelpers, RawDocType, 'findOne'>;

/** Creates a `findOneAndDelete` query: atomically finds the given document, deletes it, and returns the document as it was before deletion. */
findOneAndDelete(
Expand Down

0 comments on commit 0c65a53

Please sign in to comment.