diff --git a/packages/grafana-ui/src/types/datasource.ts b/packages/grafana-ui/src/types/datasource.ts index a34f39b59c6..8be447879e1 100644 --- a/packages/grafana-ui/src/types/datasource.ts +++ b/packages/grafana-ui/src/types/datasource.ts @@ -3,9 +3,11 @@ import { PluginMeta } from './plugin'; import { TableData, TimeSeries } from './data'; export interface DataQueryResponse { - data: TimeSeries[] | [TableData] | any; + data: DataQueryResponseData; } +export type DataQueryResponseData = TimeSeries[] | [TableData] | any; + export interface DataQuery { /** * A - Z diff --git a/public/app/types/explore.ts b/public/app/types/explore.ts index fadea49b7a4..62c309b64d0 100644 --- a/public/app/types/explore.ts +++ b/public/app/types/explore.ts @@ -4,6 +4,7 @@ import { RawTimeRange, TimeRange, DataQuery, + DataQueryResponseData, DataSourceSelectItem, DataSourceApi, QueryHint, @@ -322,7 +323,11 @@ export interface QueryTransaction { export type RangeScanner = () => RawTimeRange; -export type ResultGetter = (result: any, transaction: QueryTransaction, allTransactions: QueryTransaction[]) => any; +export type ResultGetter = ( + result: DataQueryResponseData, + transaction: QueryTransaction, + allTransactions: QueryTransaction[] +) => any; export interface TextMatch { text: string;