Skip to content

Commit 62b66ce

Browse files
committed
use decoration on methods property of Schema class
1 parent 6df0cad commit 62b66ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ declare module 'mongoose' {
297297
method(obj: Partial<TInstanceMethods>): this;
298298

299299
/** Object of currently defined methods on this schema. */
300-
methods: { [F in keyof TInstanceMethods]: TInstanceMethods[F] } & AnyObject;
300+
methods: AddThisParameter<TInstanceMethods, THydratedDocumentType> & AnyObject;
301301

302302
/** The original object passed to the schema constructor */
303303
obj: SchemaDefinition<SchemaDefinitionType<EnforcedDocType>, EnforcedDocType>;

0 commit comments

Comments
 (0)