blockly > registry > getClass

registry.getClass() function

Gets the class for the given name and type.

Signature:

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

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

Returns:

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

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