Skip to content

Commit

Permalink
chore(NA): fix types for kbn/interpreter migration
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic authored and jbudz committed Jun 17, 2021
1 parent 04b4927 commit d1209fe
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/kbn-interpreter/src/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export { Fn } from './lib/fn';
export { getType } from './lib/get_type';
export { castProvider } from './lib/cast';
// @ts-expect-error
// @internal
export { parse } from '../../grammar';
export { getByAlias } from './lib/get_by_alias';
export { Registry } from './lib/registry';
Expand Down
4 changes: 3 additions & 1 deletion packages/kbn-interpreter/src/common/lib/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ export interface ExpressionFunctionAST {
}

export interface Ast {
/** @internal */
function: any;
/** @internal */
arguments: any;
type: 'expression';
chain: ExpressionFunctionAST[];

/** @internal */
replace(regExp: RegExp, s: string): string;
}

Expand Down
1 change: 1 addition & 0 deletions packages/kbn-interpreter/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-interpreter/src",
"stripInternal": true,
"types": [
"jest",
"node"
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/canvas/public/functions/to.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* 2.0.
*/

// @ts-expect-error untyped Elastic library
import { castProvider } from '@kbn/interpreter/common';
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/public';
import { getFunctionHelp, getFunctionErrors } from '../../i18n';
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/canvas/public/registries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* 2.0.
*/

// @ts-expect-error untyped module
import { addRegistries, register } from '@kbn/interpreter/common';
// @ts-expect-error untyped local
import { elementsRegistry } from './lib/elements_registry';
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/canvas/public/state/selectors/workpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

import { get, omit } from 'lodash';
// @ts-expect-error untyped local
import { safeElementFromExpression, fromExpression } from '@kbn/interpreter/common';
import { append } from '../../lib/modify_path';
import { getAssets } from './assets';
Expand Down

0 comments on commit d1209fe

Please sign in to comment.