Skip to content

Commit

Permalink
fix: Add generic to plugin schema definition
Browse files Browse the repository at this point in the history
  • Loading branch information
emiljanitzek committed Mar 3, 2021
1 parent 4f7efb9 commit b24b917
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ declare module 'mongoose' {
pathType(path: string): string;

/** Registers a plugin for this schema. */
plugin(fn: (schema: Schema, opts?: any) => void, opts?: any): this;
plugin(fn: (schema: Schema<DocType, Model<DocType>, SchemaDefinitionType>, opts?: any) => void, opts?: any): this;

/** Defines a post hook for the model. */
post<T extends Document = DocType>(method: MongooseDocumentMiddleware | MongooseDocumentMiddleware[] | RegExp, fn: (this: T, res: any, next: (err?: CallbackError) => void) => void): this;
Expand Down

0 comments on commit b24b917

Please sign in to comment.