From 9521bd02491bc0f5f3f277cc59c868f49eb487e0 Mon Sep 17 00:00:00 2001 From: Borys Niewiadomski Date: Mon, 29 Feb 2016 13:27:57 -0600 Subject: [PATCH 1/2] adding gapi.load(...) --- gapi/gapi.d.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gapi/gapi.d.ts b/gapi/gapi.d.ts index cce0a2244..0c5e93bcf 100644 --- a/gapi/gapi.d.ts +++ b/gapi/gapi.d.ts @@ -26,6 +26,31 @@ interface GoogleApiOAuth2TokenObject { state: string; } +/** + * Fix for #8215 + * https://github.com/DefinitelyTyped/DefinitelyTyped/issues/8215 + * + * Usage example: + * https://developers.google.com/identity/sign-in/web/session-state + */ +declare module gapi { + + /** + * Pragmatically initialize gapi class member. + */ + export function load(object: string, fn: any) : any; + +} + +declare module gapi { + + /** + * Pragmatically initialize gapi class member. + */ + export function load(object: string, fn: any) : any; + +} + declare module gapi.auth { /** * Initiates the OAuth 2.0 authorization process. The browser displays a popup window prompting the user authenticate and authorize. After the user authorizes, the popup closes and the callback function fires. From efb64c7cc3501554e5f798733482169fe1686488 Mon Sep 17 00:00:00 2001 From: "Borys H.N" Date: Sat, 5 Mar 2016 10:50:37 -0600 Subject: [PATCH 2/2] update gapi.d.ts Remove duplicate module gapi. --- gapi/gapi.d.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/gapi/gapi.d.ts b/gapi/gapi.d.ts index 0c5e93bcf..aa725c426 100644 --- a/gapi/gapi.d.ts +++ b/gapi/gapi.d.ts @@ -42,15 +42,6 @@ declare module gapi { } -declare module gapi { - - /** - * Pragmatically initialize gapi class member. - */ - export function load(object: string, fn: any) : any; - -} - declare module gapi.auth { /** * Initiates the OAuth 2.0 authorization process. The browser displays a popup window prompting the user authenticate and authorize. After the user authorizes, the popup closes and the callback function fires.