mqtt: better typing

This commit is contained in:
Koushik Dutta
2021-09-22 14:55:16 -07:00
parent d1d877a6be
commit 331c0f356e
3 changed files with 4 additions and 6 deletions

View File

@@ -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",

View File

@@ -35,5 +35,5 @@
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.0.17"
"version": "0.0.18"
}

View File

@@ -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>;
}