Commit 9c33a941 by Peter Holmberg

adding types

parent e6a74eb1
...@@ -3,9 +3,11 @@ import { PluginMeta } from './plugin'; ...@@ -3,9 +3,11 @@ import { PluginMeta } from './plugin';
import { TableData, TimeSeries } from './data'; import { TableData, TimeSeries } from './data';
export interface DataQueryResponse { export interface DataQueryResponse {
data: TimeSeries[] | [TableData] | any; data: DataQueryResponseData;
} }
export type DataQueryResponseData = TimeSeries[] | [TableData] | any;
export interface DataQuery { export interface DataQuery {
/** /**
* A - Z * A - Z
......
...@@ -4,6 +4,7 @@ import { ...@@ -4,6 +4,7 @@ import {
RawTimeRange, RawTimeRange,
TimeRange, TimeRange,
DataQuery, DataQuery,
DataQueryResponseData,
DataSourceSelectItem, DataSourceSelectItem,
DataSourceApi, DataSourceApi,
QueryHint, QueryHint,
...@@ -322,7 +323,11 @@ export interface QueryTransaction { ...@@ -322,7 +323,11 @@ export interface QueryTransaction {
export type RangeScanner = () => RawTimeRange; 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 { export interface TextMatch {
text: string; text: string;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment