blockly > ComponentManager > addCapability

ComponentManager.addCapability() method

Adds a capability to a existing registered component.

Signature:

addCapability<T>(id: string, capability: string | Capability<T>): void;

Parameters

Parameter Type Description
id string The ID of the component to add the capability to.
capability string | Capability<T> The capability to add.

Returns:

void