Skip to content

Commit 4d12a62

Browse files
authored
Merge pull request #10942 from jneal-afs/fix-query-set-ts-type
Fix ts types for query set
2 parents c3463c4 + d205c4d commit 4d12a62

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)