mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
changes based on feedback
This commit is contained in:
Vendored
+4
-8
@@ -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,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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user