mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
* chore(deps): bump @typescript-eslint/eslint-plugin from 7.17.0 to 8.0.1 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.17.0 to 8.0.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.0.1/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix: lint plugin versions * chore: fix linting --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Beka Westberg <bwestberg@google.com>
35 lines
761 B
TypeScript
35 lines
761 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
// Former goog.module ID: Blockly.ISelectable
|
|
|
|
import type {Workspace} from '../workspace.js';
|
|
|
|
/**
|
|
* The interface for an object that is selectable.
|
|
*/
|
|
export interface ISelectable {
|
|
id: string;
|
|
|
|
workspace: Workspace;
|
|
|
|
/** Select this. Highlight it visually. */
|
|
select(): void;
|
|
|
|
/** Unselect this. Unhighlight it visually. */
|
|
unselect(): void;
|
|
}
|
|
|
|
/** Checks whether the given object is an ISelectable. */
|
|
export function isSelectable(obj: object): obj is ISelectable {
|
|
return (
|
|
typeof (obj as any).id === 'string' &&
|
|
(obj as any).workspace !== undefined &&
|
|
(obj as any).select !== undefined &&
|
|
(obj as any).unselect !== undefined
|
|
);
|
|
}
|