Skip to main content

Home > blockly > icons > registry > register

icons.registry.register() function

Registers the given icon so that it can be deserialized.

Signature:

export declare function register(type: IconType<IIcon>, iconConstructor: new (block: Block) => IIcon): void;

Parameters

ParameterTypeDescription
typeIconType<IIcon>The type of the icon to register. This should be the same string that is returned from its getType method.
iconConstructornew (block: Block) => IIconThe icon class/constructor to register.

Returns:

void