From a842bf79bf6e665b1fc8b250f77a15191343f6d5 Mon Sep 17 00:00:00 2001 From: FaizBShah Date: Thu, 8 Feb 2024 22:50:03 +0530 Subject: [PATCH] fix: added typescript support for arbitary fields in the options parameter of Model functions which has options type of MongooseQueryOptions --- types/query.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/query.d.ts b/types/query.d.ts index 68d2e5072a5..128d7fd26a7 100644 --- a/types/query.d.ts +++ b/types/query.d.ts @@ -32,7 +32,9 @@ declare module 'mongoose' { 'strictQuery' | 'timestamps' | 'translateAliases' - >; + > & { + [other: string]: any; + }; type ProjectionFields = { [Key in keyof DocType]?: any } & Record;