diff --git a/types/passport-strategy/index.d.ts b/types/passport-strategy/index.d.ts index 1a0b2dd4f5..33b35ddbaf 100644 --- a/types/passport-strategy/index.d.ts +++ b/types/passport-strategy/index.d.ts @@ -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 diff --git a/types/passport-strategy/passport-strategy-tests.ts b/types/passport-strategy/passport-strategy-tests.ts index e9c6fd604f..4b8090d241 100644 --- a/types/passport-strategy/passport-strategy-tests.ts +++ b/types/passport-strategy/passport-strategy-tests.ts @@ -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, {}); } }