Skip to content

Commit ac66c7b

Browse files
author
Poorshad
committed
leave the queryOptions projection as it is
For building the Projection, we need the interface, not the DocType
1 parent 19b490d commit ac66c7b

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
@@ -128,7 +128,7 @@ declare module 'mongoose' {
128128
updatedAt?: boolean;
129129
}
130130

131-
interface QueryOptions<DocType = any> extends
131+
interface QueryOptions<DocType = unknown> extends
132132
PopulateOption,
133133
SessionOption {
134134
arrayFilters?: { [key: string]: any }[];
@@ -160,7 +160,7 @@ declare module 'mongoose' {
160160
* Set `overwriteImmutable` to `true` to allow updating immutable properties using other update operators.
161161
*/
162162
overwriteImmutable?: boolean;
163-
projection?: ProjectionType<any>;
163+
projection?: { [P in keyof DocType]?: number | string } | AnyObject | string;
164164
/**
165165
* if true, returns the full ModifyResult rather than just the document
166166
*/

0 commit comments

Comments
 (0)