Skip to main content

Home > blockly > ComponentManager > hasCapability

ComponentManager.hasCapability() method

Returns whether the component with this id has the specified capability.

Signature:

hasCapability<T>(id: string, capability: string | Capability<T>): boolean;

Parameters

ParameterTypeDescription
idstringThe ID of the component to check.
capabilitystring | Capability<T>The capability to check for.

Returns:

boolean

Whether the component has the capability.