register takes a document(return type of new Model)

I kept running into errors with the file, the register function takes a Document, generated from calling new Model. This removes the wrong error.
This commit is contained in:
Simon Van den Broeck
2016-09-28 16:50:29 +02:00
committed by GitHub
parent 9400597ae8
commit 20b7c6f1df
+1 -1
View File
@@ -20,7 +20,7 @@ declare module 'mongoose' {
authenticate(): (username: string, password: string, cb: (err: any, res: T, error: any) => void) => void;
serializeUser(): (user: PassportLocalModel<T>, cb: (err: any) => void) => void;
deserializeUser(): (username: string, cb: (err: any) => void) => void;
register(user: PassportLocalModel<T>, password: string, cb: (err: any) => void): void;
register(user: T, password: string, cb: (err: any) => void): void;
findByUsername(username: string, selectHashSaltFields: boolean, cb: (err: any) => void): any;
createStrategy(): passportLocal.Strategy;
}