From 0b8351d39d116f89cd740635a6896f2c362fb3aa Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Mon, 21 Apr 2025 12:56:34 -0700 Subject: [PATCH] chore: fix lint warnings. --- src/actions/action_menu.ts | 7 +++++-- src/keyboard_drag_strategy.ts | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/actions/action_menu.ts b/src/actions/action_menu.ts index 4226ce4c..82f3eb36 100644 --- a/src/actions/action_menu.ts +++ b/src/actions/action_menu.ts @@ -86,8 +86,11 @@ export class ActionMenu { const node = cursor.getCurNode(); if (!node) return false; // TODO(google/blockly#8847): Add typeguard for IContextMenu in core when this moves over - const location = node.getLocation() as any; - if (location.showContextMenu) { + const location = node.getLocation(); + if ( + 'showContextMenu' in location && + typeof location.showContextMenu === 'function' + ) { location.showContextMenu(menuOpenEvent); } else { console.info(`No action menu for ASTNode of type ${node.getType()}`); diff --git a/src/keyboard_drag_strategy.ts b/src/keyboard_drag_strategy.ts index 0b4b3377..2bd4d1af 100644 --- a/src/keyboard_drag_strategy.ts +++ b/src/keyboard_drag_strategy.ts @@ -8,7 +8,6 @@ import { ASTNode, BlockSvg, ConnectionType, - LineCursor, RenderedConnection, dragging, utils,