From 77f516d94f46b62eada955eb29ec5f3d42153606 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 11 Jul 2019 02:51:15 +0700 Subject: [PATCH] extending Profile interface and changing VerifyCallback (#36612) * extending Profile interface and changing VerifyCallback * VerifyCallback error string | Error --- types/passport-google-oauth20/index.d.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/types/passport-google-oauth20/index.d.ts b/types/passport-google-oauth20/index.d.ts index 478a14b2e0..6a5b71c0d2 100644 --- a/types/passport-google-oauth20/index.d.ts +++ b/types/passport-google-oauth20/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jaredhanson/passport-google-oauth2 // Definitions by: Yasunori Ohoka // Eduard Zintz +// Tan Nguyen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -36,8 +37,13 @@ export interface StrategyOptionsWithRequest extends _StrategyOptionsBase { export interface Profile extends passport.Profile { profileUrl: string; + + _raw: string; + _json: any; } +export type VerifyCallback = (err?: string | Error, user?: any, info?: any) => void; + export class Strategy extends oauth2.Strategy { constructor( options: StrategyOptions, @@ -45,7 +51,7 @@ export class Strategy extends oauth2.Strategy { accessToken: string, refreshToken: string, profile: Profile, - done: oauth2.VerifyCallback + done: VerifyCallback ) => void ); constructor( @@ -55,7 +61,7 @@ export class Strategy extends oauth2.Strategy { accessToken: string, refreshToken: string, profile: Profile, - done: oauth2.VerifyCallback + done: VerifyCallback ) => void ); }