Skip to main content

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

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