mirror of
https://github.com/google/blockly.git
synced 2026-01-18 22:37:09 +01:00
* chore: add top-level inline docs to bubbles icons and inputs * chore: fixup for PR comments
24 lines
535 B
TypeScript
24 lines
535 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import type {IIcon} from '../interfaces/i_icon.js';
|
|
|
|
/**
|
|
* Thrown when you add more than one icon of the same type to a block.
|
|
*/
|
|
export class DuplicateIconType extends Error {
|
|
/**
|
|
* @internal
|
|
*/
|
|
constructor(public icon: IIcon) {
|
|
super(
|
|
`Tried to append an icon of type ${icon.getType()} when an icon of ` +
|
|
`that type already exists on the block. ` +
|
|
`Use getIcon to access the existing icon.`
|
|
);
|
|
}
|
|
}
|