From 234ca8dab0a5f123d12de0201c6895a7740bfeea Mon Sep 17 00:00:00 2001 From: Kohei Hisakuni Date: Sun, 27 Mar 2016 20:44:17 -0700 Subject: [PATCH 1/2] Add overloaded method. --- gapi/gapi.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gapi/gapi.d.ts b/gapi/gapi.d.ts index 9a5f32eba6..d1481d28c5 100644 --- a/gapi/gapi.d.ts +++ b/gapi/gapi.d.ts @@ -127,6 +127,14 @@ declare namespace gapi.auth { } declare namespace gapi.client { + /** + * Loads the client library interface to a particular API. If a callback is not provided, a promise is returned. + * @param name The name of the API to load. + * @param version The version of the API to load. + * @return promise The promise that get's resolved after the request is finished. + */ + export function load(name: string, version: string): Promise + /** * Loads the client library interface to a particular API. The new API interface will be in the form gapi.client.api.collection.method. * @param name The name of the API to load. From 95d827df4b3b2091e6aa8d329d6a34cea03b4dc9 Mon Sep 17 00:00:00 2001 From: Kohei Hisakuni Date: Tue, 29 Mar 2016 20:45:22 -0700 Subject: [PATCH 2/2] Make callback required --- gapi/gapi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gapi/gapi.d.ts b/gapi/gapi.d.ts index d1481d28c5..9e4e603bb2 100644 --- a/gapi/gapi.d.ts +++ b/gapi/gapi.d.ts @@ -141,7 +141,7 @@ declare namespace gapi.client { * @param version The version of the API to load * @param callback the function that is called once the API interface is loaded */ - export function load(name: string, version: string, callback?: () => any): void; + export function load(name: string, version: string, callback: () => any): void; /** * Creates a HTTP request for making RESTful requests. * An object encapsulating the various arguments for this method.