blockly > registry > getClassFromOptions

registry.getClassFromOptions() function

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


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


Parameter Type Description
type Type<T> The type of the plugin.
options Options The option object to check for the given plugin.
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 for the plugin.