From bdacde8d08be20a3f57ce602afc2174dcda81e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Denis?= Date: Wed, 15 Feb 2017 15:53:30 +0100 Subject: [PATCH] [gapi.auth2] Fix prompt param type in GoogleAuth.signIn and similar methods --- gapi.auth2/gapi.auth2-tests.ts | 7 +++++++ gapi.auth2/index.d.ts | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gapi.auth2/gapi.auth2-tests.ts b/gapi.auth2/gapi.auth2-tests.ts index 2cfaa49980..15fd8b4e2b 100644 --- a/gapi.auth2/gapi.auth2-tests.ts +++ b/gapi.auth2/gapi.auth2-tests.ts @@ -19,6 +19,13 @@ function test_getAuthInstance(){ var auth = gapi.auth2.getAuthInstance(); } +function test_signIn(){ + gapi.auth2.getAuthInstance().signIn({ + scope: 'email profile', + prompt: 'content' + }); +} + function test_getAuthResponse(){ var user = gapi.auth2.getAuthInstance().currentUser.get(); var authResponse = user.getAuthResponse(); diff --git a/gapi.auth2/index.d.ts b/gapi.auth2/index.d.ts index 6037f0238e..c30f37d013 100644 --- a/gapi.auth2/index.d.ts +++ b/gapi.auth2/index.d.ts @@ -34,7 +34,7 @@ declare namespace gapi.auth2 { signIn(options?: { app_package_name?: string; fetch_basic_profile?: boolean; - prompt?: boolean; + prompt?: string; scope?: string; }, optionBuilder?: SigninOptionsBuilder): any; @@ -62,7 +62,7 @@ declare namespace gapi.auth2 { attachClickHandler(container: any, options: { app_package_name?: string; fetch_basic_profile?: boolean; - prompt?: boolean; + prompt?: string; scope?: string; }, onsuccess: (googleUser: GoogleUser) => any, onfailure: (reason: string) => any): any; } @@ -167,7 +167,7 @@ declare namespace gapi.auth2 { signIn(options?: { app_package_name?: string; fetch_basic_profile?: boolean; - prompt?: boolean; + prompt?: string; scope?: string; }, optionBuilder?: SigninOptionsBuilder): any; @@ -177,7 +177,7 @@ declare namespace gapi.auth2 { grant(options?: { app_package_name?: string; fetch_basic_profile?: boolean; - prompt?: boolean; + prompt?: string; scope?: string; }, optionBuilder?: SigninOptionsBuilder): any;