MadLittleMods / node-usb-detection

List USB devices in system and detect changes on them.
MIT License
370 stars 114 forks source link

Updated type definitions for 4.5.0 #90

Closed RicoBrase closed 4 years ago

RicoBrase commented 4 years ago

Updated type definitions to node-usb-detection 4.5.0

Old type definitions only allowed find() function to return a Promise object, if the function was called without parameters.

The updated type definitions now accept find(vid) and find(vid, pid) as Promise-based functions as well - just as stated in the ReadMe:

Note: All find calls return a promise even with the node-style callback flavors

Technically, the type definitons currently wont allow find() to be called with callback function parameter AND returning a Promise either - I could add that too, if desired.

MadLittleMods commented 4 years ago

Thanks for the update @RicoBrase! Nice incremental improvement :+1:

RicoBrase commented 4 years ago

You're welcome. Feel free to contact me, if the type definitions need an update.