/// import { DataStream } from '../core/DataStream'; import { Device } from '../devices/Device'; export declare type CoreDeviceType = T & { constructor?: Function; connect?: Function; disconnect?: Function; }; export declare type DeviceAttributes = USBDetails & BLEDetails & { bufferSize?: number; url?: string; }; export declare type DeviceConfig = DeviceConstraintsType & CoreDeviceType & DeviceAttributes & { label: string; kind: string; protocols?: string[]; modes?: string[]; ondata?: (data: any, name?: string) => (any[] | { [x: string | number]: any; }); encode?: (data: any, name?: string) => any; decode?: (data: any, name?: string) => any; oninit?: (target: any) => Promise; onconnect?: (target: any) => Promise; ondisconnect?: (target: any) => Promise; onerror?: (error: Error) => Promise; debug?: boolean; }; export declare type USBDetails = Partial & { usbVendorId?: number | string; usbProductId?: number | string; }; export declare type BLEDetails = { namePrefix?: string; serviceUUID?: string; characteristics?: { [x: string]: string; }; }; export declare type DeviceConstraintsType = MediaStreamConstraints & { screen?: boolean; } & DeviceAttributes & { stream?: DataStream; device?: Device | CoreDeviceType; bluetooth?: boolean | BLEDetails; usb?: boolean | USBDetails; serial?: boolean | USBDetails; wifi?: boolean | string; websocket?: boolean | string; mode?: string; protocol?: string | string[]; };