Skip to content

Commit

Permalink
Clean up KibanaDatatable and KibanaContext types.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeelmers committed May 23, 2019
1 parent 14e8043 commit 248d0ed
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
* under the License.
*/

import { Filters, Query, TimeRange } from 'ui/visualize';

const name = 'kibana_context';

// TODO: Provide better typings for these
export interface KibanaContext {
type: typeof name;
query: any[];
filters: any[];
timeRange: any;
query?: Query;
filters?: Filters;
timeRange?: TimeRange;
}

export const kibanaContext = () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface Column {
}

interface Row {
[key: string]: object;
[key: string]: unknown;
}

export interface KibanaDatatable {
Expand Down
1 change: 1 addition & 0 deletions src/legacy/core_plugins/interpreter/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
export { ArgumentType, TypeToArgumentString } from './arguments';
export { UnwrapPromise } from './common';
export { ExpressionFunction } from './functions';
export * from '../common/types';
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,12 @@
import { fromExpression } from '@kbn/interpreter/common';
// @ts-ignore
import { getInterpreter } from 'plugins/interpreter/interpreter';
// @ts-ignore
import { KibanaContext } from 'plugins/interpreter/types';

import { Adapters } from 'ui/inspector';
import { Filters, Query, TimeRange } from 'ui/visualize';

interface InitialContextObject {
timeRange?: TimeRange;
filters?: Filters;
query?: Query;
}

type getInitialContextFunction = () => InitialContextObject;
type getInitialContextFunction = () => KibanaContext;

interface RunPipelineHandlers {
getInitialContext: getInitialContextFunction;
Expand Down

0 comments on commit 248d0ed

Please sign in to comment.