export const VENDOR_ID = 0x2b24 ; export const WEBUSB_PRODUCT_ID = 0x0002 ; export const HID_PRODUCT_ID = 0x0001 ; export function makePromise ( func , ... args ) { return new Promise ( ( resolve ) => { func ( ... args , resolve ) ; } ) ; } declare const chrome ; export const chromeUSB = chrome ?. [ "usb" ] as unknown ; export type ChromeUSB = { openDevice : any ; onDeviceAdded : { addListener : Function ; } ; onDeviceRemoved : { addListener : Function ; } ; getDevices : any ; closeDevice : any ; setConfiguration : any ; claimInterface : any ; interruptTransfer : any ; } ; export function assertChromeUSB ( c ) { if ( ! c ) throw new Error ( "ChromeUSB is not available in this process. This package is intended for Chrome apps and extensions." ) ; }