@ledgerhq/hw-transport
Advanced tools
Comparing version 1.1.0-beta.e6f42082 to 1.1.0
@@ -81,3 +81,3 @@ "use strict"; | ||
* events can come over times, for instance if you plug a USB device after listen() or a bluetooth device become discoverable | ||
* @param cb is a function called each time a descriptor is found | ||
* @param observer is an object with a next, error and complete function (compatible with observer pattern) | ||
* @return a Subscription object on which you can `.unsubscribe()` to stop discovering descriptors. | ||
@@ -84,0 +84,0 @@ * @example |
{ | ||
"name": "@ledgerhq/hw-transport", | ||
"version": "1.1.0-beta.e6f42082", | ||
"version": "1.1.0", | ||
"description": "Ledger Hardware Wallet common interface of the communication layer", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,3 +6,8 @@ //@flow | ||
type Subscription = { unsubscribe: () => void }; | ||
export type Subscription = { unsubscribe: () => void }; | ||
export type Observer<T> = { | ||
next: (descriptor: T) => void, | ||
error: (e: ?Error) => void, | ||
complete: () => void | ||
}; | ||
@@ -29,3 +34,3 @@ /** | ||
* events can come over times, for instance if you plug a USB device after listen() or a bluetooth device become discoverable | ||
* @param cb is a function called each time a descriptor is found | ||
* @param observer is an object with a next, error and complete function (compatible with observer pattern) | ||
* @return a Subscription object on which you can `.unsubscribe()` to stop discovering descriptors. | ||
@@ -39,3 +44,3 @@ * @example | ||
*/ | ||
static +discover: (cb: (descriptor: Descriptor) => void) => Subscription; | ||
static +discover: (observer: Observer<Descriptor>) => Subscription; | ||
@@ -42,0 +47,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
36534
632
0