mirror of
https://github.com/koush/scrypted.git
synced 2026-02-10 09:12:03 +00:00
mqtt: better typing
This commit is contained in:
4
plugins/mqtt/package-lock.json
generated
4
plugins/mqtt/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/mqtt",
|
||||
"version": "0.0.17",
|
||||
"version": "0.0.18",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/mqtt",
|
||||
"version": "0.0.17",
|
||||
"version": "0.0.18",
|
||||
"dependencies": {
|
||||
"@types/node": "^16.6.1",
|
||||
"aedes": "^0.46.1",
|
||||
|
||||
@@ -35,5 +35,5 @@
|
||||
"devDependencies": {
|
||||
"@scrypted/sdk": "file:../../sdk"
|
||||
},
|
||||
"version": "0.0.17"
|
||||
"version": "0.0.18"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { ScryptedInterface } from "@scrypted/sdk";
|
||||
|
||||
export interface MqttEvent {
|
||||
buffer?: Buffer;
|
||||
json?: any;
|
||||
@@ -16,6 +14,6 @@ export interface MqttHandler {
|
||||
|
||||
export interface MqttClient {
|
||||
subscribe(subscriptions: MqttSubscriptions, options?: any): void;
|
||||
handle<T>(handler?: T, ...interfaces: string[]): void;
|
||||
handle<T>(handler?: T & object, ...interfaces: string[]): void;
|
||||
publish(topic: string, value: any): Promise<void>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user