mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
Add Query and QueryResponse definitions
This commit is contained in:
38
google.visualization/google.visualization.d.ts
vendored
38
google.visualization/google.visualization.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
// Type definitions for Google Visualisation Apis
|
||||
// Project: https://developers.google.com/chart/
|
||||
// Definitions by: Dan Ludwig <https://github.com/danludwig>
|
||||
// Definitions by: Dan Ludwig <https://github.com/danludwig>, Gregory Moore <https://github.com/gmoore-sjcorg>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace google {
|
||||
@@ -186,6 +186,42 @@ declare namespace google {
|
||||
|
||||
function arrayToDataTable(data: any[], firstRowIsData?: boolean): DataTable;
|
||||
|
||||
//#endregion
|
||||
//#region Query
|
||||
|
||||
// https://developers.google.com/chart/interactive/docs/reference#query
|
||||
export class Query {
|
||||
constructor(dataSourceUrl: string, options?: QueryOptions);
|
||||
|
||||
abort(): void;
|
||||
|
||||
setRefreshInterval(intervalSeconds: number): void;
|
||||
setTimeout(timeoutSeconds: number): void;
|
||||
setQuery(queryString:string): void;
|
||||
|
||||
send(responseHandler): void;
|
||||
}
|
||||
|
||||
export interface QueryOptions {
|
||||
sendMethod?: string,
|
||||
makeRequestParams?: Object
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region QueryResponse
|
||||
|
||||
// https://developers.google.com/chart/interactive/docs/reference#queryresponse
|
||||
export class QueryResponse {
|
||||
constructor(responseObject: Object);
|
||||
|
||||
getDataTable(): DataTable;
|
||||
getDetailedMessage(): string;
|
||||
getMessage(): string;
|
||||
getReasons(): string[];
|
||||
hasWarning(): boolean;
|
||||
isError(): boolean;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region DataView
|
||||
|
||||
|
||||
Reference in New Issue
Block a user