mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Add definition for usb.removeListener(...)
This commit is contained in:
Vendored
+1
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user