Skip to content

Commit

Permalink
fix: added typescript support for arbitary fields in the options para…
Browse files Browse the repository at this point in the history
…meter of Model functions which has options type of MongooseQueryOptions
  • Loading branch information
FaizBShah committed Feb 8, 2024
1 parent 2c34102 commit a842bf7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion types/query.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ declare module 'mongoose' {
'strictQuery' |
'timestamps' |
'translateAliases'
>;
> & {
[other: string]: any;
};

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

Expand Down

0 comments on commit a842bf7

Please sign in to comment.