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

Parameter Type Description
type IconType<IIcon> The type of the icon to register. This should be the same string that is returned from its getType method.
iconConstructor new (block: Block) => IIcon The icon class/constructor to register.

Returns:

void