Skip to content

Commit

Permalink
Merge pull request #14342 from FaizBShah/master
Browse files Browse the repository at this point in the history
Added typescript support for arbitrary fields for the options parameter of Model functions which are of type MongooseQueryOptions
  • Loading branch information
vkarpov15 committed Feb 8, 2024
2 parents 6579f93 + 348ec51 commit f164b44
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion types/query.d.ts
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 f164b44

Please sign in to comment.