From 73e5a5026641eda668d1c787bfa25b065645e539 Mon Sep 17 00:00:00 2001 From: linusbrolin Date: Wed, 14 Sep 2016 14:47:12 +0200 Subject: [PATCH] Added an overload for the default mongoose plugin function (#11202) This fixes typing errors when other plugins (with different types of options) are used on the same model as this one. --- passport-local-mongoose/passport-local-mongoose.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/passport-local-mongoose/passport-local-mongoose.d.ts b/passport-local-mongoose/passport-local-mongoose.d.ts index ab2539a709..a3b5414c84 100644 --- a/passport-local-mongoose/passport-local-mongoose.d.ts +++ b/passport-local-mongoose/passport-local-mongoose.d.ts @@ -74,6 +74,9 @@ declare module 'mongoose' { plugin: (schema: PassportLocalSchema, options?: PassportLocalOptions) => void, options?: PassportLocalOptions ): this; + + // overload for the default mongoose plugin function + plugin(plugin: (schema: Schema, options?: Object) => void, opts?: Object): this; } export function model(