From e153d72ce27b82bd008f8474874c51849eb27c66 Mon Sep 17 00:00:00 2001 From: koji Date: Wed, 17 Jan 2024 14:40:40 -0500 Subject: [PATCH] fix type issues --- app-shell/src/system-info/index.ts | 4 +++- app-shell/src/system-info/usb-devices.ts | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app-shell/src/system-info/index.ts b/app-shell/src/system-info/index.ts index fbb4db94d62..8211b89d17c 100644 --- a/app-shell/src/system-info/index.ts +++ b/app-shell/src/system-info/index.ts @@ -48,7 +48,9 @@ const addDriverVersion = (device: USBDevice): Promise => { device.manufacturerName != null && RE_REALTEK.test(device.manufacturerName) ) { - return getWindowsDriverVersion(device).then(windowsDriverVersion => + return getWindowsDriverVersion( + createUsbDevice(device) + ).then(windowsDriverVersion => createUsbDevice(device, windowsDriverVersion) ) } diff --git a/app-shell/src/system-info/usb-devices.ts b/app-shell/src/system-info/usb-devices.ts index c27c426d72c..583b06cccef 100644 --- a/app-shell/src/system-info/usb-devices.ts +++ b/app-shell/src/system-info/usb-devices.ts @@ -7,8 +7,8 @@ import { createLogger } from '../log' import type { UsbDevice } from '@opentrons/app/src/redux/system-info/types' export type UsbDeviceMonitorOptions = Partial<{ - onDeviceAdd?: (device: UsbDevice) => unknown - onDeviceRemove?: (device: UsbDevice) => unknown + onDeviceAdd?: (device: USBDevice) => void + onDeviceRemove?: (device: USBDevice) => void }> export interface UsbDeviceMonitor { @@ -50,7 +50,7 @@ const decToHex = (number: number): string => number.toString(16).toUpperCase().padStart(4, '0') export function getWindowsDriverVersion( - device: USBDevice + device: UsbDevice ): Promise { console.log('getWindowsDriverVersion', device) const { vendorId: vidDecimal, productId: pidDecimal, serialNumber } = device