@@ -90,9 +90,9 @@ declare module 'mongoose' {
9090 $session ( session ?: ClientSession | null ) : ClientSession | null ;
9191
9292 /** Alias for `set()`, used internally to avoid conflicts */
93- $set ( path : string , val : any , type : any , options ?: DocumentSetOptions ) : this;
94- $set ( path : string , val : any , options ?: DocumentSetOptions ) : this;
95- $set ( value : any ) : this;
93+ $set ( path : string | Record < string , any > , val : any , type : any , options ?: DocumentSetOptions ) : this;
94+ $set ( path : string | Record < string , any > , val : any , options ?: DocumentSetOptions ) : this;
95+ $set ( value : string | Record < string , any > ) : this;
9696
9797 /** Set this property to add additional query filters when Mongoose saves this document and `isNew` is false. */
9898 $where : Record < string , unknown > ;
@@ -216,9 +216,9 @@ declare module 'mongoose' {
216216 schema : Schema ;
217217
218218 /** Sets the value of a path, or many paths. */
219- set ( path : string , val : any , type : any , options ?: any ) : this;
220- set ( path : string , val : any , options ?: any ) : this;
221- set ( value : any ) : this;
219+ set ( path : string | Record < string , any > , val : any , type : any , options ?: DocumentSetOptions ) : this;
220+ set ( path : string | Record < string , any > , val : any , options ?: DocumentSetOptions ) : this;
221+ set ( value : string | Record < string , any > ) : this;
222222
223223 /** The return value of this method is used in calls to JSON.stringify(doc). */
224224 toJSON < T = Require_id < DocType > > ( options ?: ToObjectOptions & { flattenMaps ?: true } ) : FlattenMaps < T > ;
0 commit comments