Skip to content

Commit

Permalink
fix type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
koji committed Jan 17, 2024
1 parent 309fe2c commit e153d72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion app-shell/src/system-info/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ const addDriverVersion = (device: USBDevice): Promise<UsbDevice> => {
device.manufacturerName != null &&
RE_REALTEK.test(device.manufacturerName)
) {
return getWindowsDriverVersion(device).then(windowsDriverVersion =>
return getWindowsDriverVersion(
createUsbDevice(device)
).then(windowsDriverVersion =>
createUsbDevice(device, windowsDriverVersion)
)
}
Expand Down
6 changes: 3 additions & 3 deletions app-shell/src/system-info/usb-devices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -50,7 +50,7 @@ const decToHex = (number: number): string =>
number.toString(16).toUpperCase().padStart(4, '0')

export function getWindowsDriverVersion(
device: USBDevice
device: UsbDevice
): Promise<string | null> {
console.log('getWindowsDriverVersion', device)
const { vendorId: vidDecimal, productId: pidDecimal, serialNumber } = device
Expand Down

0 comments on commit e153d72

Please sign in to comment.