blockly > registry > getClass

registry.getClass() function

Gets the class for the given name and type.


export declare function getClass<T>(type: string | Type<T>, name: string, opt_throwIfMissing?: boolean): (new (...p1: any[]) => T) | null;


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)
opt_throwIfMissing boolean (Optional) Whether or not to throw an error if we are unable to find the plugin.


(new (...p1: any[]) => T) | null

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