Skip to main content

Function: getClassFromOptions()

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

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

Gets the class from Blockly options for the given type. This is used for plugins that override a built in feature. (e.g. Toolbox)

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
typeType<T>The type of the plugin.
optionsOptionsThe option object to check for the given plugin.
opt_throwIfMissing?booleanWhether or not to throw an error if we are unable to find the plugin.

Returns

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

The class for the plugin.