mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 06:19:58 +08:00
Updated types for noble advertisement data
This commit is contained in:
6
types/noble/index.d.ts
vendored
6
types/noble/index.d.ts
vendored
@@ -6,6 +6,7 @@
|
||||
// Luke Libraro <https://github.com/lukel99>
|
||||
// Dan Chao <https://github.com/bioball>
|
||||
// Michal Lower <https://github.com/keton>
|
||||
// Rob Moran <https://github.com/thegecko>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@@ -63,7 +64,10 @@ export declare class Peripheral extends events.EventEmitter {
|
||||
|
||||
export interface Advertisement {
|
||||
localName: string;
|
||||
serviceData: Buffer;
|
||||
serviceData: {
|
||||
uuid: string,
|
||||
data: Buffer
|
||||
};
|
||||
txPowerLevel: number;
|
||||
manufacturerData: Buffer;
|
||||
serviceUuids: string[];
|
||||
|
||||
@@ -39,7 +39,10 @@ var peripheral: noble.Peripheral = new noble.Peripheral();
|
||||
peripheral.uuid = "12ad4e81";
|
||||
peripheral.advertisement = {
|
||||
localName: "device",
|
||||
serviceData: new Buffer(1),
|
||||
serviceData: {
|
||||
uuid: "180a",
|
||||
data: new Buffer(1)
|
||||
},
|
||||
txPowerLevel: 1,
|
||||
manufacturerData: new Buffer(1),
|
||||
serviceUuids: ["0x180a", "0x180d"]
|
||||
|
||||
Reference in New Issue
Block a user