Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/web-bluetooth

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/web-bluetooth - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

46

web-bluetooth/index.d.ts

@@ -28,2 +28,46 @@ // Type definitions for Web Bluetooth

type BluetoothManufacturerData = Map<number, DataView>;
type BluetoothServiceData = Map<BluetoothServiceUUID, DataView>;
interface BluetoothDataFilter {
readonly dataPrefix: DataView;
readonly mask: DataView;
}
interface BluetoothManufacturerDataFilter {
readonly [manufacturerId: number]: BluetoothDataFilter;
}
type BluetoothServiceDataFilter = {
readonly [serviceUUID in BluetoothServiceUUID]: BluetoothDataFilter;
};
interface BluetoothLEScanFilter {
readonly name?: string;
readonly namePrefix?: string;
readonly services?: BluetoothServiceUUID[];
readonly manufacturerData?: BluetoothManufacturerDataFilter;
readonly serviceData?: BluetoothServiceDataFilter;
}
interface RequestLEScanOptions {
readonly filters?: BluetoothLEScanFilter[];
readonly keepRepeatedDevices?: boolean;
readonly acceptAllAdvertisements?: boolean;
}
interface BluetoothLEScan extends RequestLEScanOptions {
active: boolean;
stop: () => void;
}
interface BluetoothAdvertisementEvent extends Event {
device: BluetoothDevice;
rssi: number;
txPower: number;
manufacturerData?: BluetoothManufacturerData;
serviceData?: BluetoothServiceData;
uuids?: BluetoothServiceUUID[];
}
interface BluetoothRemoteGATTDescriptor {

@@ -120,3 +164,5 @@ readonly characteristic: BluetoothRemoteGATTCharacteristic;

requestDevice(options?: RequestDeviceOptions): Promise<BluetoothDevice>;
requestLEScan(options?: RequestLEScanOptions): Promise<BluetoothLEScan>;
addEventListener(type: "availabilitychanged", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "advertisementreceived", listener: (this: this, ev: BluetoothAdvertisementEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;

@@ -123,0 +169,0 @@ }

4

web-bluetooth/package.json
{
"name": "@types/web-bluetooth",
"version": "0.0.6",
"version": "0.0.7",
"description": "TypeScript definitions for Web Bluetooth",

@@ -31,4 +31,4 @@ "license": "MIT",

"dependencies": {},
"typesPublisherContentHash": "d56194c8b4f832546284eafea8e180e5a3e8820d7f90e32afc28b6f7364366fb",
"typesPublisherContentHash": "205465f876c44bdbf5736092cb611da80b36c00913c88133cf5153ad49fe72f2",
"typeScriptVersion": "3.0"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Fri, 15 May 2020 13:12:56 GMT
* Last updated: Fri, 26 Jun 2020 10:06:00 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc