Skip to content

Commit c6fd7f7

Browse files
committed
Fix ts types for query set
1 parent 271bc60 commit c6fd7f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2442,7 +2442,7 @@ declare module 'mongoose' {
24422442
* This is useful for query middleware so you can add an update regardless
24432443
* of whether you use `updateOne()`, `updateMany()`, `findOneAndUpdate()`, etc.
24442444
*/
2445-
set(path: string, value: any): this;
2445+
set(path: string | Record<string, unknown>, value: any): this;
24462446

24472447
/** Sets query options. Some options only make sense for certain operations. */
24482448
setOptions(options: QueryOptions, overwrite?: boolean): this;

0 commit comments

Comments
 (0)