blockly > registry > hasItem

registry.hasItem() function

Returns whether or not the registry contains an item with the given type and name.

Signature:

export declare function hasItem<T>(type: string | Type<T>, name: string): boolean;

Parameters

Parameter Type Description
type string | Type<T> The type of the plugin. (e.g. Field, Renderer)
name string The plugin's name. (Ex. field_angle, geras)

Returns:

boolean

True if the registry has an item with the given type and name, false otherwise.