MQTT types: Add connect event

This commit is contained in:
uwap 2018-01-20 14:28:00 +01:00
parent a677da4ed5
commit ea0a836241
2 changed files with 3 additions and 3 deletions

View file

@ -5,8 +5,7 @@ const config : Config = {
space: {
name: "RZL",
color: "orange",
mqtt: "ws://192.168.178.90:1884"
//mqtt: "ws://map.rzl:1884"
mqtt: "ws://map.rzl:1884"
},
topics: [
{

View file

@ -41,13 +41,14 @@ declare module 'mqtt' {
publish(topic: string, message: Buffer | string, options: ?PublishOptions, callback: any): void; // TODO: message: Buffer|string, callback..., topic array and topic object
subscribe(topic: string | Array<string>, cb: (error: Error, granted: any) => void): void; // TODO: granted
subscribe(topic: string | Array<string>, cb?: (error: Error, granted: any) => void): void; // TODO: granted
subscribe(topic: string | Array<string>, opts: ClientSubscribeOptions, cb: (error: Error, granted: any) => void): void; // TODO: granted
on(event: "message", // TODO: packet
cb: (topic: string, payload: Buffer, packet: any) => void): void;
on(event: "offline", cb: () => void): void;
on(event: "reconnect", cb: () => void): void;
on(event: "connect", cb: () => void): void;
on(event: "close", cb: () => void): void;
}