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.
Updated type definitions to node-usb-detection 4.5.0
Old type definitions only allowed
find()
function to return aPromise
object, if the function was called without parameters.The updated type definitions now accept
find(vid)
andfind(vid, pid)
as Promise-based functions as well - just as stated in the ReadMe: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.