forked from MadLittleMods/node-usb-detection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
27 lines (23 loc) · 1.03 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Type definitions for usb-detection 4.5.0
// Project: https://github.com/MadLittleMods/node-usb-detection
// Definitions by: Rob Moran <https://github.com/thegecko>
// Rico Brase <https://github.com/RicoBrase>
export interface Device {
locationId: number;
vendorId: number;
productId: number;
deviceName: string;
manufacturer: string;
serialNumber: string;
deviceAddress: number;
}
export function find(vid: number, pid: number, callback: (error: any, devices: Device[]) => any): void;
export function find(vid: number, pid: number): Promise<Device[]>;
export function find(vid: number, callback: (error: any, devices: Device[]) => any): void;
export function find(vid: number): Promise<Device[]>;
export function find(callback: (error: any, devices: Device[]) => any): void;
export function find(): Promise<Device[]>;
export function startMonitoring(): void;
export function stopMonitoring(): void;
export function on(event: string, callback: (device: Device) => void): void;
export const version: number;