mirror of
https://github.com/google/blockly.git
synced 2026-01-06 16:40:07 +01:00
refactor: Remove some uses of AnyDuringMigration (#6307)
* refactor: Remove uses of AnyDuringMigration from trashcan.ts. * refactor: Remove uses of AnyDuringMigration in bubble.ts. * refactor: Remove uses of AnyDuringMigration from connection_checker.ts. * refactor: Remove uses of AnyDuringMigration from connection_db.ts. * refactor: Remove uses of AnyDuringMigration in contextmenu_items.ts. * refactor: Remove uses of AnyDuringMigration from grid.ts. * refactor: Remove uses of AnyDuringMigration from i_drag_target.ts. * refactor: Remove uses of AnyDuringMigration from i_ast_node_location_svg.ts. * refactor: Remove uses of AnyDuringMigration from i_ast_node_location_with_block.ts. * refactor: Remove uses of AnyDuringMigration from i_autohideable.ts. * refactor: Remove uses of AnyDuringMigration from i_block_dragger.ts. * refactor: Remove uses of AnyDuringMigration from i_bounded_element.ts. * refactor: Remove uses of AnyDuringMigration from i_bubble.ts. * refactor: Remove uses of AnyDuringMigration from i_collapsible_toolbox_item.ts. * refactor: Remove uses of AnyDuringMigration from i_connection_checker.ts. * refactor: Remove uses of AnyDuringMigration from i_contextmenu.ts. * refactor: Remove uses of AnyDuringMigration in i_copyable.ts. * refactor: Remove uses of AnyDuringMigration from i_deleteable.ts. * refactor: Remove uses of AnyDuringMigration from i_delete_area.ts. * refactor: Remove uses of AnyDuringMigration in i_flyout.ts. * refactor: Remove uses of AnyDuringMigration in i_keyboard_accessible.ts. * refactor: Remove uses of AnyDuringMigration in i_metrics_manager.ts. * refactor: Remove uses of AnyDuringMigration from i_movable.ts. * refactor: Remove uses of AnyDuringMigration in i_positionable.ts. * refactor: Remove uses of AnyDuringMigration in i_selectable_toolbox_item.ts. * refactor: Remove uses of AnyDuringMigration from i_selectable.ts. * refactor: Remove uses of AnyDuringMigration in i_serializer.ts. * refactor: Remove uses of AnyDuringMigration from i_styleable.ts. * refactor: Remove uses of AnyDuringMigration in i_toolbox.ts. * refactor: Make non-null checks explicit.
This commit is contained in:
@@ -15,6 +15,10 @@
|
||||
* @namespace Blockly.IDragTarget
|
||||
*/
|
||||
import * as goog from '../../closure/goog/goog.js';
|
||||
import {Rect} from '../utils/rect.js';
|
||||
|
||||
import {IDraggable} from './i_draggable.js';
|
||||
|
||||
goog.declareModuleId('Blockly.IDragTarget');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -40,33 +44,33 @@ export interface IDragTarget extends IComponent {
|
||||
* @return The component's bounding box. Null if drag target area should be
|
||||
* ignored.
|
||||
*/
|
||||
getClientRect: AnyDuringMigration;
|
||||
getClientRect(): Rect|null;
|
||||
|
||||
/**
|
||||
* Handles when a cursor with a block or bubble enters this drag target.
|
||||
* @param dragElement The block or bubble currently being dragged.
|
||||
*/
|
||||
onDragEnter: AnyDuringMigration;
|
||||
onDragEnter(dragElement: IDraggable): void;
|
||||
|
||||
/**
|
||||
* Handles when a cursor with a block or bubble is dragged over this drag
|
||||
* target.
|
||||
* @param dragElement The block or bubble currently being dragged.
|
||||
*/
|
||||
onDragOver: AnyDuringMigration;
|
||||
onDragOver(dragElement: IDraggable): void;
|
||||
|
||||
/**
|
||||
* Handles when a cursor with a block or bubble exits this drag target.
|
||||
* @param dragElement The block or bubble currently being dragged.
|
||||
*/
|
||||
onDragExit: AnyDuringMigration;
|
||||
onDragExit(dragElement: IDraggable): void;
|
||||
|
||||
/**
|
||||
* Handles when a block or bubble is dropped on this component.
|
||||
* Should not handle delete here.
|
||||
* @param dragElement The block or bubble currently being dragged.
|
||||
*/
|
||||
onDrop: AnyDuringMigration;
|
||||
onDrop(dragElement: IDraggable): void;
|
||||
|
||||
/**
|
||||
* Returns whether the provided block or bubble should not be moved after
|
||||
@@ -76,5 +80,5 @@ export interface IDragTarget extends IComponent {
|
||||
* @return Whether the block or bubble provided should be returned to drag
|
||||
* start.
|
||||
*/
|
||||
shouldPreventMove: AnyDuringMigration;
|
||||
shouldPreventMove(dragElement: IDraggable): boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user