@ledgerhq/hw-transport
Advanced tools
Comparing version 1.1.0-beta.9f0d7158 to 1.1.0-beta.b03dab45
@@ -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 onNext, onError and onDone 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.9f0d7158", | ||
"version": "1.1.0-beta.b03dab45", | ||
"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> = { | ||
onNext: (descriptor: T) => void, | ||
onError: (e: ?Error) => void, | ||
onDone: () => 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 onNext, onError and onDone function (compatible with observer pattern) | ||
* @return a Subscription object on which you can `.unsubscribe()` to stop discovering descriptors. | ||
@@ -39,7 +44,3 @@ * @example | ||
*/ | ||
static +discover: ( | ||
onNext: (descriptor: Descriptor) => void, | ||
onError?: (e: Error) => void, | ||
onDone?: () => void | ||
) => Subscription; | ||
static +discover: (observer: Observer<Descriptor>) => Subscription; | ||
@@ -46,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
36562
632