changes based on feedback

This commit is contained in:
Luke Libraro
2017-06-01 13:02:20 -05:00
parent 4d2f91fcce
commit 3da30f0911
2 changed files with 8 additions and 12 deletions
+4 -8
View File
@@ -11,14 +11,10 @@
import events = require("events");
export declare function startScanning(): void;
export declare function startScanning(callback: Function): void;
export declare function startScanning(serviceUUIDs: string[]): void;
export declare function startScanning(serviceUUIDs: string[], callback: Function): void;
export declare function startScanning(serviceUUIDs: string[], allowDuplicates: boolean): void;
export declare function startScanning(serviceUUIDs: string[], allowDuplicates: boolean, callback: Function): void;
export declare function stopScanning(): void;
export declare function stopScanning(callback: Function): void;
export declare function startScanning(callback?: (error?: Error) => void): void;
export declare function startScanning(serviceUUIDs: string[], callback?: (error?: Error) => void): void;
export declare function startScanning(serviceUUIDs: string[], allowDuplicates: boolean, callback?: (error?: Error) => void): void;
export declare function stopScanning(callback?: () => void): void;
export declare function on(event: string, listener: Function): events.EventEmitter;
export declare function on(event: "stateChange", listener: (state: string) => void): events.EventEmitter;
+4 -4
View File
@@ -4,18 +4,18 @@ import noble = require("noble");
function test_startScanning(): void {
"use strict";
noble.startScanning();
noble.startScanning(function(err: any) {});
noble.startScanning((err: Error) => {});
noble.startScanning(["0x180d"]);
noble.startScanning(["0x180d"], function(err: any) {});
noble.startScanning(["0x180d"], (err: Error) => {});
noble.startScanning(["0x180d"], true);
noble.startScanning(["0x180d"], true, function(err: any) {});
noble.startScanning(["0x180d"], true, (err: Error) => {});
}
test_startScanning();
function test_stopScanning(): void {
"use strict";
noble.stopScanning();
noble.stopScanning(function(err: any) {});
noble.stopScanning(() => {});
}
test_stopScanning();