Skip to content

Commit 0c65a53

Browse files
authored
Merge pull request #14737 from hasezoey/7xFixQueryFind
types(query): fix usage of "RawDocType" where "DocType" should be passed
2 parents 061bb82 + 1ced015 commit 0c65a53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

types/query.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ declare module 'mongoose' {
374374
): QueryWithHelpers<Array<DocType>, DocType, THelpers, RawDocType, 'find'>;
375375
find(
376376
filter: FilterQuery<RawDocType>
377-
): QueryWithHelpers<Array<RawDocType>, DocType, THelpers, RawDocType, 'find'>;
377+
): QueryWithHelpers<Array<DocType>, DocType, THelpers, RawDocType, 'find'>;
378378
find(): QueryWithHelpers<Array<DocType>, DocType, THelpers, RawDocType, 'find'>;
379379

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

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

0 commit comments

Comments
 (0)