Home > blockly > utils > extensions > registerMixin
utils.extensions.registerMixin() function
Registers a new extension function that adds all key/value of mixinObj.
Signature:
export declare function registerMixin(name: string, mixinObj: any): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of this extension. |
| mixinObj | any | The values to mix in. |
Returns:
void
Exceptions
{Error} if the extension name is empty or the extension is already registered.