Adding promises to GAPI

This commit is contained in:
Brett Morgan 2014-08-20 10:22:05 +10:00
parent 25ccf82570
commit 376e27131e

17
gapi/gapi.d.ts vendored
View File

@ -141,6 +141,23 @@ declare module gapi.client {
statusText: string;
}
) => any):void;
/**
* HttpRequest supports promises.
*/
then(success:(response:{
result:T;
body:string;
headers?: any[];
status?: number;
statusText?: string
})=>void,
failure:(response:{
result:T;
body:string;
headers?: any[];
status?: number;
statusText?: string
})=>void): void;
}
/**
* Represents an HTTP Batch operation. Individual HTTP requests are added with the add method and the batch is executed using execute.