mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Add definition for removeAllListeners to noble
This commit is contained in:
Vendored
+2
@@ -30,6 +30,8 @@ export declare function removeListener(event: "scanStop", listener: () => void):
|
||||
export declare function removeListener(event: "discover", listener: (peripheral: Peripheral) => void): events.EventEmitter;
|
||||
export declare function removeListener(event: string, listener: Function): events.EventEmitter;
|
||||
|
||||
export declare function removeAllListeners(event?: string): events.EventEmitter;
|
||||
|
||||
export declare var state:string;
|
||||
|
||||
export declare class Peripheral extends events.EventEmitter {
|
||||
|
||||
@@ -35,6 +35,12 @@ noble.removeListener("discover", (peripheral: noble.Peripheral): void => {
|
||||
peripheral.disconnect((): void => {});
|
||||
});
|
||||
|
||||
noble.removeAllListeners("stateChange");
|
||||
noble.removeAllListeners("scanStart");
|
||||
noble.removeAllListeners("scanStop");
|
||||
noble.removeAllListeners("discover");
|
||||
noble.removeAllListeners();
|
||||
|
||||
var peripheral: noble.Peripheral = new noble.Peripheral();
|
||||
peripheral.uuid = "12ad4e81";
|
||||
peripheral.advertisement = {
|
||||
|
||||
Reference in New Issue
Block a user