Skip to main content

Home > 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

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

Returns:

boolean

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