Skip to content

Commit

Permalink
Adding types placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
poffdeluxe committed Dec 18, 2019
1 parent bf4f4f0 commit 337408a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/server/collectors/collector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { CallCluster } from 'src/legacy/core_plugins/elasticsearch';
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { CANVAS_USAGE_TYPE } from '../../../../legacy/plugins/canvas/common/lib/constants';
import { TelemetryCollector } from '../../../../legacy/plugins/canvas/types';
import { TelemetryCollector } from '../../types';

import { workpadCollector } from './workpad_collector';
import { customElementCollector } from './custom_element_collector';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @param cb: callback to do something with a function that has been found
*/

import { ExpressionAST, ExpressionArgAST } from '../../../../legacy/plugins/canvas/types';
import { ExpressionAST, ExpressionArgAST } from '../../types';

function isExpression(maybeExpression: ExpressionArgAST): maybeExpression is ExpressionAST {
return typeof maybeExpression === 'object';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { summarizeCustomElements } from './custom_element_collector';
import { TelemetryCustomElementDocument } from '../../../../legacy/plugins/canvas/types';
import { TelemetryCustomElementDocument } from '../../types';

function mockCustomElement(...nodeExpressions: string[]): TelemetryCustomElementDocument {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
TelemetryCollector,
TelemetryCustomElement,
TelemetryCustomElementDocument,
} from '../../../../legacy/plugins/canvas/types';
} from '../../types';

const CUSTOM_ELEMENT_TYPE = 'canvas-element';
interface CustomElementSearch {
Expand Down
6 changes: 1 addition & 5 deletions x-pack/plugins/canvas/server/collectors/workpad_collector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import { sum as arraySum, min as arrayMin, max as arrayMax, get } from 'lodash';
import { fromExpression } from '@kbn/interpreter/common';
import { CANVAS_TYPE } from '../../../../legacy/plugins/canvas/common/lib/constants';
import { collectFns } from './collector_helpers';
import {
ExpressionAST,
TelemetryCollector,
CanvasWorkpad,
} from '../../../../legacy/plugins/canvas/types';
import { ExpressionAST, TelemetryCollector, CanvasWorkpad } from '../../types';

interface WorkpadSearch {
[CANVAS_TYPE]: CanvasWorkpad;
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/canvas/types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

export * from '../../../legacy/plugins/canvas/types';

0 comments on commit 337408a

Please sign in to comment.