Skip to content

Commit 8c7db20

Browse files
committed
Use w3cusb types externally
1 parent 87f3293 commit 8c7db20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/usb.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import { EventDispatcher, TypedDispatcher } from "./dispatcher";
2727
import { USBAdapter, adapter } from "./adapter";
2828
import { W3CUSBConnectionEvent } from "./events";
29-
import { USBDevice } from "./device";
3029
import { W3CUSB } from "./interfaces";
30+
import { USBDevice as Device } from "./device";
3131

3232
/**
3333
* USB Options
@@ -58,7 +58,7 @@ export interface USBEvents {
5858
*/
5959
export class USB extends (EventDispatcher as new() => TypedDispatcher<USBEvents>) implements W3CUSB {
6060

61-
private allowedDevices: Array<USBDevice> = [];
61+
private allowedDevices: Array<Device> = [];
6262
private devicesFound: (devices: Array<USBDevice>) => Promise<USBDevice | void>;
6363

6464
private _onconnect: (ev: USBConnectionEvent) => void;
@@ -144,7 +144,7 @@ export class USB extends (EventDispatcher as new() => TypedDispatcher<USBEvents>
144144
});
145145
}
146146

147-
private replaceAllowedDevice(device: USBDevice): boolean {
147+
private replaceAllowedDevice(device: Device): boolean {
148148
for (const i in this.allowedDevices) {
149149
if (this.isSameDevice(device, this.allowedDevices[i])) {
150150
this.allowedDevices[i] = device;

0 commit comments

Comments
 (0)