adding types

This commit is contained in:
Peter Holmberg 2019-03-13 10:50:21 +01:00
parent e6a74eb1a2
commit 9c33a9410f
2 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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;