blockly > registry > getObject

registry.getObject() function

Gets the object for the given name and type.


export declare function getObject<T>(type: string | Type<T>, name: string, opt_throwIfMissing?: boolean): T | null;


Parameter Type Description
type string | Type<T> The type of the plugin. (e.g. Category)
name string The plugin's name. (Ex. logic_category)
opt_throwIfMissing boolean (Optional) Whether or not to throw an error if we are unable to find the object.


T | null

The object with the given name and type or null if none exists.