Files
blockly/core/interfaces/i_deletable.ts
Beka Westberg 6fe080bc6e fix: draggable interface and concrete dragger (#7967)
* fix: interface to match design

* fix: dragger implementation

* fix: rename moveToStart to revertDrag

* fixup
2024-03-28 15:11:30 -07:00

25 lines
516 B
TypeScript

/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Former goog.module ID: Blockly.IDeletable
/**
* The interface for an object that can be deleted.
*/
export interface IDeletable {
/**
* Get whether this object is deletable or not.
*
* @returns True if deletable.
*/
isDeletable(): boolean;
}
/** Returns whether the given object is an IDeletable. */
export function isDeletable(obj: any): obj is IDeletable {
return obj['isDeletable'] !== undefined;
}