Skip to content

Commit a842bf7

Browse files
committed
fix: added typescript support for arbitary fields in the options parameter of Model functions which has options type of MongooseQueryOptions
1 parent 2c34102 commit a842bf7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

types/query.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ declare module 'mongoose' {
3232
'strictQuery' |
3333
'timestamps' |
3434
'translateAliases'
35-
>;
35+
> & {
36+
[other: string]: any;
37+
};
3638

3739
type ProjectionFields<DocType> = { [Key in keyof DocType]?: any } & Record<string, any>;
3840

0 commit comments

Comments
 (0)