diff --git a/test/types/plugin.test.ts b/test/types/plugin.test.ts index 3bc39f4c9c9..06e209fd2d2 100644 --- a/test/types/plugin.test.ts +++ b/test/types/plugin.test.ts @@ -59,10 +59,17 @@ const testSchema = new Schema('Test', testSchema); diff --git a/types/index.d.ts b/types/index.d.ts index 5ffa2f25abf..4f0d8467e10 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -264,7 +264,7 @@ declare module 'mongoose' { pathType(path: string): string; /** Registers a plugin for this schema. */ - plugin, POptions extends Parameters[1] = Parameters[1]>(fn: PFunc, opts?: POptions): this; + plugin, POptions extends Parameters[1] = Parameters[1]>(fn: PFunc, opts?: POptions): this; /** Defines a post hook for the model. */ post>(method: MongooseDocumentMiddleware | MongooseDocumentMiddleware[] | RegExp, fn: PostMiddlewareFunction): this;