mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
Merge pull request #28157 from sun1x/patch-1
[passport-strategy] optional 'info' parameter in 'success' method
This commit is contained in:
Vendored
+1
-1
@@ -45,7 +45,7 @@ declare class Strategy implements passport.Strategy {
|
||||
* @param {Object} info
|
||||
* @api public
|
||||
*/
|
||||
success(user: any, info: any): void;
|
||||
success(user: any, info?: any): void;
|
||||
|
||||
/**
|
||||
* Fail authentication, with optional `challenge` and `status`, defaulting
|
||||
|
||||
@@ -33,7 +33,7 @@ export class Strategy extends passport.Strategy {
|
||||
|
||||
var self = this;
|
||||
|
||||
function verified(err: Error, user: any, info: any) {
|
||||
function verified(err: Error, user: any, info?: any) {
|
||||
if (err) {
|
||||
return self.error(err);
|
||||
}
|
||||
@@ -43,6 +43,6 @@ export class Strategy extends passport.Strategy {
|
||||
self.success(user, info);
|
||||
}
|
||||
|
||||
verified(null, {}, {});
|
||||
verified(null, {});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user