Add definition for usb.removeListener(...)

This commit is contained in:
Sandeep Mistry
2019-01-13 15:52:54 -05:00
parent 3a69de74e2
commit f85acea83a
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -137,6 +137,7 @@ export class EndpointDescriptor {
export function findByIds(vid: number, pid: number): Device;
export function on(event: string, callback: (device: Device) => void): void;
export function removeListener(event: string, callback: (device: Device) => void): void;
export function getDeviceList(): Device[];
export function setDebugLevel(level: number): void;
+1
View File
@@ -124,6 +124,7 @@ iface.endpoints = [inEndpoint, outEndpoint];
const findByDevice: usb.Device = usb.findByIds(1, 1);
usb.on("hey", (device: usb.Device) => null);
usb.removeListener("hey", (device: usb.Device) => null);
const deviceList: usb.Device[] = usb.getDeviceList();
usb.setDebugLevel(1);