diff --git a/types/gapi.auth2/gapi.auth2-tests.ts b/types/gapi.auth2/gapi.auth2-tests.ts index 16818e414e..1fc03f7f4f 100644 --- a/types/gapi.auth2/gapi.auth2-tests.ts +++ b/types/gapi.auth2/gapi.auth2-tests.ts @@ -55,8 +55,8 @@ function test_render() { const success = (googleUser: gapi.auth2.GoogleUser): void => { console.log(googleUser); }; - const failure = (): void => { - console.log('Failure callback'); + const failure = (reason: { error: string }): void => { + console.log(`Failure callback: ${reason.error}`); }; gapi.signin2.render('testId', { diff --git a/types/gapi.auth2/index.d.ts b/types/gapi.auth2/index.d.ts index fdb4c08cc3..bd40ce9650 100644 --- a/types/gapi.auth2/index.d.ts +++ b/types/gapi.auth2/index.d.ts @@ -349,7 +349,7 @@ declare namespace gapi.signin2 { /** * The callback function to call when sign-in fails (default: none). */ - onfailure?(): void; + onfailure?(reason: { error: string }): void; /** * The package name of the Android app to install over the air. See