Skip to content

Commit 92cad53

Browse files
fix!: delete IASTNodeLocation and friends (#9015)
1 parent 561129a commit 92cad53

11 files changed

Lines changed: 3 additions & 70 deletions

core/block.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import {EndRowInput} from './inputs/end_row_input.js';
4040
import {Input} from './inputs/input.js';
4141
import {StatementInput} from './inputs/statement_input.js';
4242
import {ValueInput} from './inputs/value_input.js';
43-
import type {IASTNodeLocation} from './interfaces/i_ast_node_location.js';
4443
import {isCommentIcon} from './interfaces/i_comment_icon.js';
4544
import {type IIcon} from './interfaces/i_icon.js';
4645
import type {
@@ -61,7 +60,7 @@ import type {Workspace} from './workspace.js';
6160
* Class for one block.
6261
* Not normally called directly, workspace.newBlock() is preferred.
6362
*/
64-
export class Block implements IASTNodeLocation {
63+
export class Block {
6564
/**
6665
* An optional callback method to use whenever the block's parent workspace
6766
* changes. This is usually only called from the constructor, the block type

core/block_svg.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import {IconType} from './icons/icon_types.js';
3939
import {MutatorIcon} from './icons/mutator_icon.js';
4040
import {WarningIcon} from './icons/warning_icon.js';
4141
import type {Input} from './inputs/input.js';
42-
import type {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js';
4342
import type {IBoundedElement} from './interfaces/i_bounded_element.js';
4443
import {IContextMenu} from './interfaces/i_contextmenu.js';
4544
import type {ICopyable} from './interfaces/i_copyable.js';
@@ -74,7 +73,6 @@ import type {WorkspaceSvg} from './workspace_svg.js';
7473
export class BlockSvg
7574
extends Block
7675
implements
77-
IASTNodeLocationSvg,
7876
IBoundedElement,
7977
IContextMenu,
8078
ICopyable<BlockCopyData>,

core/blockly.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ import {FocusableTreeTraverser} from './utils/focusable_tree_traverser.js';
124124

125125
import {Input} from './inputs/input.js';
126126
import {InsertionMarkerPreviewer} from './insertion_marker_previewer.js';
127-
import {IASTNodeLocation} from './interfaces/i_ast_node_location.js';
128-
import {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js';
129-
import {IASTNodeLocationWithBlock} from './interfaces/i_ast_node_location_with_block.js';
130127
import {IAutoHideable} from './interfaces/i_autohideable.js';
131128
import {IBoundedElement} from './interfaces/i_bounded_element.js';
132129
import {IBubble} from './interfaces/i_bubble.js';
@@ -541,9 +538,6 @@ export {
541538
Gesture,
542539
Grid,
543540
HorizontalFlyout,
544-
IASTNodeLocation,
545-
IASTNodeLocationSvg,
546-
IASTNodeLocationWithBlock,
547541
IAutoHideable,
548542
IBoundedElement,
549543
IBubble,

core/connection.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import type {BlockMove} from './events/events_block_move.js';
1717
import {EventType} from './events/type.js';
1818
import * as eventUtils from './events/utils.js';
1919
import type {Input} from './inputs/input.js';
20-
import type {IASTNodeLocationWithBlock} from './interfaces/i_ast_node_location_with_block.js';
2120
import type {IConnectionChecker} from './interfaces/i_connection_checker.js';
2221
import * as blocks from './serialization/blocks.js';
2322
import {idGenerator} from './utils.js';
@@ -26,7 +25,7 @@ import * as Xml from './xml.js';
2625
/**
2726
* Class for a connection between blocks.
2827
*/
29-
export class Connection implements IASTNodeLocationWithBlock {
28+
export class Connection {
3029
/** Constants for checking whether two connections are compatible. */
3130
static CAN_CONNECT = 0;
3231
static REASON_SELF_CONNECTION = 1;

core/field.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ import * as dropDownDiv from './dropdowndiv.js';
2323
import {EventType} from './events/type.js';
2424
import * as eventUtils from './events/utils.js';
2525
import type {Input} from './inputs/input.js';
26-
import type {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js';
27-
import type {IASTNodeLocationWithBlock} from './interfaces/i_ast_node_location_with_block.js';
2826
import type {IFocusableNode} from './interfaces/i_focusable_node.js';
2927
import type {IFocusableTree} from './interfaces/i_focusable_tree.js';
3028
import type {IKeyboardAccessible} from './interfaces/i_keyboard_accessible.js';
@@ -71,8 +69,6 @@ export type FieldValidator<T = any> = (newValue: T) => T | null | undefined;
7169
*/
7270
export abstract class Field<T = any>
7371
implements
74-
IASTNodeLocationSvg,
75-
IASTNodeLocationWithBlock,
7672
IKeyboardAccessible,
7773
IRegistrable,
7874
ISerializable,

core/flyout_button.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212
// Former goog.module ID: Blockly.FlyoutButton
1313

14-
import type {IASTNodeLocationSvg} from './blockly.js';
1514
import * as browserEvents from './browser_events.js';
1615
import * as Css from './css.js';
1716
import type {IBoundedElement} from './interfaces/i_bounded_element.js';
@@ -34,7 +33,6 @@ import type {WorkspaceSvg} from './workspace_svg.js';
3433
*/
3534
export class FlyoutButton
3635
implements
37-
IASTNodeLocationSvg,
3836
IBoundedElement,
3937
IRenderedElement,
4038
IFocusableNode,

core/interfaces/i_ast_node_location.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

core/interfaces/i_ast_node_location_svg.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

core/interfaces/i_ast_node_location_with_block.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

core/workspace.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import * as common from './common.js';
2121
import type {ConnectionDB} from './connection_db.js';
2222
import type {Abstract} from './events/events_abstract.js';
2323
import * as eventUtils from './events/utils.js';
24-
import type {IASTNodeLocation} from './interfaces/i_ast_node_location.js';
2524
import type {IConnectionChecker} from './interfaces/i_connection_checker.js';
2625
import {IProcedureMap} from './interfaces/i_procedure_map.js';
2726
import type {IVariableMap} from './interfaces/i_variable_map.js';
@@ -43,7 +42,7 @@ import {deleteVariable, getVariableUsesById} from './variables.js';
4342
* Class for a workspace. This is a data structure that contains blocks.
4443
* There is no UI, and can be created headlessly.
4544
*/
46-
export class Workspace implements IASTNodeLocation {
45+
export class Workspace {
4746
/**
4847
* Angle away from the horizontal to sweep for blocks. Order of execution is
4948
* generally top to bottom, but a small angle changes the scan to give a bit

0 commit comments

Comments
 (0)