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.
This commit is contained in:
linusbrolin
2016-09-14 14:47:12 +02:00
committed by Masahiro Wakame
parent c404aa6f7b
commit 73e5a50266

View File

@@ -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<T extends Document>(