Skip to content

Commit

Permalink
fixup linter and build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimkibana committed Nov 28, 2024
1 parent 27d7457 commit 8e24d21
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/kbn-esql-ast/src/visitor/__tests__/scenarios.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import { parse } from '../../parser';
import { ESQLAstQueryExpression } from '../../types';
import { ESQLAstItem, ESQLAstQueryExpression } from '../../types';
import { Visitor } from '../visitor';

test('change LIMIT from 24 to 42', () => {
Expand Down Expand Up @@ -93,7 +93,7 @@ test('can remove a specific WHERE command', () => {
})
.on('visitCommand', (ctx) => {
if (ctx.node.name === 'where') {
ctx.node.args = [...ctx.visitArguments()].filter(Boolean);
ctx.node.args = [...ctx.visitArguments()].filter(Boolean) as ESQLAstItem[];
}
return ctx.node;
})
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-esql-ast/src/visitor/contexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { type GlobalVisitorContext, SharedData } from './global_visitor_context'
import { children, firstItem, singleItems } from './utils';
import type {
ESQLAstCommand,
ESQLAstExpression,
ESQLAstItem,
ESQLAstNodeWithArgs,
ESQLAstNodeWithChildren,
Expand All @@ -28,7 +29,6 @@ import type {
ESQLList,
ESQLLiteral,
ESQLOrderExpression,
ESQLSingleAstItem,
ESQLSource,
ESQLTimeInterval,
} from '../types';
Expand Down Expand Up @@ -541,7 +541,7 @@ export class InlineCastExpressionVisitorContext<
Methods extends VisitorMethods = VisitorMethods,
Data extends SharedData = SharedData
> extends ExpressionVisitorContext<Methods, Data, ESQLInlineCast> {
public value(): ESQLSingleAstItem {
public value(): ESQLAstExpression {
this.ctx.assertMethodExists('visitExpression');

const value = firstItem([this.node.value])!;
Expand Down

0 comments on commit 8e24d21

Please sign in to comment.