Skip to main content

Function: getClass()

function getClass<T>(
type,
name,
opt_throwIfMissing?
): ((...p1) => T) | null;

Defined in: packages/blockly/core/registry.ts:308

Gets the class for the given name and type.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
typestring | Type<T>The type of the plugin. (e.g. Field, Renderer)
namestringThe plugin's name. (Ex. field_angle, geras)
opt_throwIfMissing?booleanWhether or not to throw an error if we are unable to find the plugin.

Returns

((...p1) => T) | null

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