Files
blockly/core/interfaces/i_collapsible_toolbox_item.ts
Maribeth Bottorff 88ff901a72 chore: use prettier instead of clang-format (#7014)
* chore: add and configure prettier

* chore: remove clang-format

* chore: remove clang-format config

* chore: lint additional ts files

* chore: fix lint errors in blocks

* chore: add prettier-ignore where needed

* chore: ignore js blocks when formatting

* chore: fix playground html syntax

* chore: fix yaml spacing from merge

* chore: convert text blocks to use arrow functions

* chore: format everything with prettier

* chore: fix lint unused imports in blocks
2023-05-10 16:01:39 -07:00

35 lines
944 B
TypeScript

/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.ICollapsibleToolboxItem');
import type {ISelectableToolboxItem} from './i_selectable_toolbox_item.js';
import type {IToolboxItem} from './i_toolbox_item.js';
/**
* Interface for an item in the toolbox that can be collapsed.
*/
export interface ICollapsibleToolboxItem extends ISelectableToolboxItem {
/**
* Gets any children toolbox items. (ex. Gets the subcategories)
*
* @returns The child toolbox items.
*/
getChildToolboxItems(): IToolboxItem[];
/**
* Whether the toolbox item is expanded to show its child subcategories.
*
* @returns True if the toolbox item shows its children, false if it is
* collapsed.
*/
isExpanded(): boolean;
/** Toggles whether or not the toolbox item is expanded. */
toggleExpanded(): void;
}