mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-17 12:16:38 +08:00
Merge pull request #10404 from kitcheck/node-usb-semiprivate-methods
Adding access to two semi-private node-usb methods
This commit is contained in:
@@ -9,6 +9,9 @@ device.busNumber = 1;
|
||||
device.deviceAddress = 1;
|
||||
device.portNumbers = [1, 2, 3];
|
||||
|
||||
device.__open();
|
||||
device.__claimInterface(0);
|
||||
|
||||
device.open(true);
|
||||
device.close();
|
||||
const xferDevice: usb.Device = device.controlTransfer(1, 1, 1, 1, 1, (error: string, buf: Buffer): usb.Device => new usb.Device());
|
||||
|
||||
3
node-usb/node-usb.d.ts
vendored
3
node-usb/node-usb.d.ts
vendored
@@ -16,6 +16,9 @@ declare module "usb" {
|
||||
public configDescriptor: ConfigDescriptor;
|
||||
public interfaces: Array<Interface>;
|
||||
|
||||
__open(): void;
|
||||
__claimInterface(addr: number): void;
|
||||
|
||||
open(defaultConfig?: boolean): void;
|
||||
close(): void;
|
||||
interface(addr: number): Interface;
|
||||
|
||||
Reference in New Issue
Block a user