mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Merge pull request #8745 from khisakuni/gapi/add-promise-return-value
Add overloaded method.
This commit is contained in:
10
gapi/gapi.d.ts
vendored
10
gapi/gapi.d.ts
vendored
@@ -127,13 +127,21 @@ 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<void>
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @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.
|
||||
|
||||
Reference in New Issue
Block a user