diff --git a/index.d.ts b/index.d.ts index 27b8f348745..695fe60b3b4 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2442,7 +2442,7 @@ declare module 'mongoose' { * This is useful for query middleware so you can add an update regardless * of whether you use `updateOne()`, `updateMany()`, `findOneAndUpdate()`, etc. */ - set(path: string, value: any): this; + set(path: string | Record, value?: any): this; /** Sets query options. Some options only make sense for certain operations. */ setOptions(options: QueryOptions, overwrite?: boolean): this;