Skip to main content

Class: IconType<_T>

Defined in: packages/blockly/core/icons/icon_types.ts:15

Defines the type of an icon, so that it can be retrieved from block.getIcon

Type Parameters​

Type Parameter
_T extends IIcon

Properties index​

PropertyDescription
MUTATOR-
WARNING-
COMMENT-

Methods index​

MethodDescription
toStringReturns the name of the type.
equalsReturns true if this icon type is equivalent to the given icon type.

Constructors​

Constructor​

new IconType<_T>(name): IconType<_T>;

Defined in: packages/blockly/core/icons/icon_types.ts:17

Parameters​

ParameterTypeDescription
namestringThe name of the registry type.

Returns​

IconType<_T>

Properties​

MUTATOR​

static MUTATOR: IconType<MutatorIcon>;

Defined in: packages/blockly/core/icons/icon_types.ts:29


WARNING​

static WARNING: IconType<WarningIcon>;

Defined in: packages/blockly/core/icons/icon_types.ts:30


COMMENT​

static COMMENT: IconType<ICommentIcon>;

Defined in: packages/blockly/core/icons/icon_types.ts:31

Methods​

toString()​

toString(): string;

Defined in: packages/blockly/core/icons/icon_types.ts:20

Returns​

string

the name of the type.


equals()​

equals(type): boolean;

Defined in: packages/blockly/core/icons/icon_types.ts:25

Parameters​

ParameterType
typeIconType<IIcon>

Returns​

boolean

true if this icon type is equivalent to the given icon type.