@camera.ui/sdk / plugin / hasInterface
Function: hasInterface() ​
hasInterface(
contract,iface):boolean
Defined in: plugin/helper.ts:260
Reports whether the plugin implements the given capability.
Parameters ​
contract ​
Plugin contract to inspect.
iface ​
Interface to check (e.g. PluginInterface.DiscoveryProvider).
Returns ​
boolean
true if iface is listed in the contract's interfaces.
Example ​
ts
import { hasInterface, PluginInterface } from '@camera.ui/sdk';
if (hasInterface(contract, PluginInterface.DiscoveryProvider)) startScan();