Central: { addListener: (<K>(type: K,
listener: EventReceiver<CentralEventMap[K]>) => void); addPeripheralConnectionListener: ((peripheral: PeripheralOrSystemId,
listener: ((ev: CentralEventMap["peripheralConnectionStatus"]) => void)) => void); connectPeripheral: ((peripheral: PeripheralOrSystemId,
timeoutMs?: number) => Promise<void>); disconnectPeripheral: ((peripheral: PeripheralOrSystemId) => Promise<void>); getBluetoothState: (() => BluetoothState); getCharacteristicProperties: ((peripheral: PeripheralOrSystemId,
serviceUuid: string,
characteristicUuid: string,
instanceIndex?: number) => Promise<number>); getDiscoveredServices: ((peripheral: PeripheralOrSystemId) => Promise<string[]>); getPeripheralMtu: ((peripheral: PeripheralOrSystemId) => Promise<number>); getPeripheralName: ((peripheral: PeripheralOrSystemId) => Promise<string>); getScanStatus: (() => ScanStatus); getServiceCharacteristics: ((peripheral: PeripheralOrSystemId,
serviceUuid: string) => Promise<string[]>); initialize: (() => void); isInitialized: (() => boolean); readCharacteristic: ((peripheral: PeripheralOrSystemId,
serviceUuid: string,
characteristicUuid: string,
options?: { instanceIndex?: number; timeoutMs?: number; }) => Promise<Uint8Array>); readPeripheralRssi: ((peripheral: PeripheralOrSystemId,
_timeoutMs?: 10000) => Promise<number>); releasePeripheral: ((peripheral: PeripheralOrSystemId) => Promise<void>); removeListener: (<T>(type: T,
listener: ((ev: CentralEventMap[T]) => void)) => void); removePeripheralConnectionListener: ((peripheral: PeripheralOrSystemId,
listener: ((ev: CentralEventMap["peripheralConnectionStatus"]) => void)) => void); shutdown: (() => void); startScan: ((services?: string | readonly string[],
context?: unknown) => Promise<void>); stopScan: (() => Promise<void>); subscribeCharacteristic: ((peripheral: PeripheralOrSystemId,
serviceUuid: string,
characteristicUuid: string,
onValueChanged: ((ev: PeripheralCharacteristicValueChangedEvent) => void),
options?: { instanceIndex?: number; timeoutMs?: number; }) => Promise<void>); unsubscribeCharacteristic: ((peripheral: PeripheralOrSystemId,
serviceUuid: string,
characteristicUuid: string,
options?: { instanceIndex?: number; timeoutMs?: number; }) => Promise<void>); writeCharacteristic: ((peripheral: PeripheralOrSystemId,
serviceUuid: string,
characteristicUuid: string,
data: ArrayBuffer,
options?: { instanceIndex?: number; timeoutMs?: number; withoutResponse?: boolean; }) => Promise<void>); }