Make namespace lower-case (types/noble)

This commit is contained in:
Takeshi YAEDA 2017-05-19 09:03:08 +09:00
parent a9be423793
commit 09d36cb59e
2 changed files with 14 additions and 14 deletions

View File

@ -8,7 +8,7 @@
import events = require("events");
export as namespace Noble;
export as namespace noble;
export declare function startScanning(serviceUUIDs?: string[], allowDuplicates?: boolean, callback?: (error: Error) => void): void;
export declare function stopScanning(callback?: () => void): void;

View File

@ -20,12 +20,12 @@ test_stopScanning();
noble.on("stateChange", (state: string): void => {});
noble.on("scanStart", (): void => {});
noble.on("scanStop", (): void => {});
noble.on("discover", (peripheral: Noble.Peripheral): void => {
noble.on("discover", (peripheral: noble.Peripheral): void => {
peripheral.connect((error: string): void => {});
peripheral.disconnect((): void => {});
});
var peripheral: Noble.Peripheral = new noble.Peripheral();
var peripheral: noble.Peripheral = new noble.Peripheral();
peripheral.uuid = "12ad4e81";
peripheral.advertisement = {
localName: "device",
@ -41,19 +41,19 @@ peripheral.disconnect((): void => {});
peripheral.updateRssi();
peripheral.updateRssi((error: string, rssi: number): void => {});
peripheral.discoverServices(["180d"]);
peripheral.discoverServices(["180d"], (error: string, services: Noble.Service[]): void => {});
peripheral.discoverServices(["180d"], (error: string, services: noble.Service[]): void => {});
peripheral.discoverAllServicesAndCharacteristics();
peripheral.discoverAllServicesAndCharacteristics((error: string, services: Noble.Service[], characteristics: Noble.Characteristic[]): void => {});
peripheral.discoverAllServicesAndCharacteristics((error: string, services: noble.Service[], characteristics: noble.Characteristic[]): void => {});
peripheral.discoverSomeServicesAndCharacteristics(["180d"], ["2a38"]);
peripheral.discoverSomeServicesAndCharacteristics(["180d"], ["2a38"], (error: string, services: Noble.Service[], characteristics: Noble.Characteristic[]): void => {});
peripheral.discoverSomeServicesAndCharacteristics(["180d"], ["2a38"], (error: string, services: noble.Service[], characteristics: noble.Characteristic[]): void => {});
peripheral.readHandle(new Buffer(1), (error: string, data: NodeBuffer): void => {});
peripheral.writeHandle(new Buffer(1), new Buffer(1), true, (error: string): void => {});
peripheral.on("connect", (error: string): void => {});
peripheral.on("disconnect", (error: string): void => {});
peripheral.on("rssiUpdate", (rssi: number): void => {});
peripheral.on("servicesDiscover", (services: Noble.Service[]): void => {});
peripheral.on("servicesDiscover", (services: noble.Service[]): void => {});
var service: Noble.Service = new noble.Service();
var service: noble.Service = new noble.Service();
service.uuid = "180a";
service.name = "";
service.type = "";
@ -61,11 +61,11 @@ service.includedServiceUuids = ["180d"];
service.discoverIncludedServices(["180d"]);
service.discoverIncludedServices(["180d"], (error: string, includedServiceUuids: string[]): void => {});
service.discoverCharacteristics(["2a38"]);
service.discoverCharacteristics(["2a38"], (error: string, characteristics: Noble.Characteristic[]): void => {});
service.discoverCharacteristics(["2a38"], (error: string, characteristics: noble.Characteristic[]): void => {});
service.on("includedServicesDiscover", (includedServiceUuids: string[]): void => {});
service.on("characteristicsDiscover", (characteristics: Noble.Characteristic[]): void => {});
service.on("characteristicsDiscover", (characteristics: noble.Characteristic[]): void => {});
var characteristic: Noble.Characteristic = new noble.Characteristic();
var characteristic: noble.Characteristic = new noble.Characteristic();
characteristic.uuid = "2a37";
characteristic.name = "";
characteristic.type = "";
@ -79,14 +79,14 @@ characteristic.broadcast(true, (error: string): void => {});
characteristic.notify(true);
characteristic.notify(true, (error: string): void => {});
characteristic.discoverDescriptors();
characteristic.discoverDescriptors((error: string, descriptors: Noble.Descriptor[]): void => {});
characteristic.discoverDescriptors((error: string, descriptors: noble.Descriptor[]): void => {});
characteristic.on("read", (data: NodeBuffer, isNotification: boolean): void => {});
characteristic.on("write", true, (error: string): void => {});
characteristic.on("broadcast", (state: string): void => {});
characteristic.on("notify", (state: string): void => {});
characteristic.on("descriptorsDiscover", (descriptors: Noble.Descriptor[]): void => {});
characteristic.on("descriptorsDiscover", (descriptors: noble.Descriptor[]): void => {});
var descriptor: Noble.Descriptor = new noble.Descriptor();
var descriptor: noble.Descriptor = new noble.Descriptor();
descriptor.uuid = "";
descriptor.name = "";
descriptor.type = "";