@meshtastic/meshtasticjs
Advanced tools
Comparing version 0.6.65 to 0.6.66
@@ -5,2 +5,3 @@ import { IBLEConnection } from "./iBleConnection.js"; | ||
import type { DeviceInterface } from "./types.js"; | ||
export declare type IConnection = IBLEConnection | IHTTPConnection | ISerialConnection; | ||
/** | ||
@@ -31,5 +32,10 @@ * Allows to create new connections to devices and manages them. | ||
* Adds an already created connection interface to the client | ||
* @param connectionObj Desired Bluetooth or HTTP connection to device | ||
* @param connectionObj Desired Bluetooth, Serial or HTTP connection to add | ||
*/ | ||
addConnection(connectionObj: DeviceInterface): void; | ||
/** | ||
* Removes a connection interface from the client | ||
* @param connectionObj Desired Bluetooth, Serial or HTTP connection to remove | ||
*/ | ||
removeConnection(connectionObj: DeviceInterface): void; | ||
} |
@@ -43,3 +43,3 @@ import { IBLEConnection } from "./iBleConnection.js"; | ||
* Adds an already created connection interface to the client | ||
* @param connectionObj Desired Bluetooth or HTTP connection to device | ||
* @param connectionObj Desired Bluetooth, Serial or HTTP connection to add | ||
*/ | ||
@@ -49,3 +49,13 @@ addConnection(connectionObj) { | ||
} | ||
/** | ||
* Removes a connection interface from the client | ||
* @param connectionObj Desired Bluetooth, Serial or HTTP connection to remove | ||
*/ | ||
removeConnection(connectionObj) { | ||
const index = this.deviceInterfaces.indexOf(connectionObj); | ||
if (index !== -1) { | ||
this.deviceInterfaces.splice(index, 1); | ||
} | ||
} | ||
} | ||
//# sourceMappingURL=client.js.map |
@@ -30,3 +30,3 @@ /// <reference types="w3c-web-serial" /> | ||
/** | ||
* Gets list of serial ports that can be passed to `connect` | ||
* Opens browsers connection dialogue to select a serial port | ||
*/ | ||
@@ -33,0 +33,0 @@ getPort(filter?: SerialPortRequestOptions): Promise<SerialPort>; |
@@ -58,3 +58,3 @@ import { Types } from "./index.js"; | ||
/** | ||
* Gets list of serial ports that can be passed to `connect` | ||
* Opens browsers connection dialogue to select a serial port | ||
*/ | ||
@@ -61,0 +61,0 @@ async getPort(filter) { |
{ | ||
"name": "@meshtastic/meshtasticjs", | ||
"version": "0.6.65", | ||
"version": "0.6.66", | ||
"description": "Browser library for interfacing with meshtastic devices", | ||
@@ -5,0 +5,0 @@ "license": "GPL-3.0-only", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
494518
10300