You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to the above a number of event emitter typescript definitions are missing or generically described. Missing ones are: disconnect, close, end, reconnect, offline, outgoingEmpty.
Generically described are: connect and message.
PR #1249 address all the TypeScript issues in this comment and above.
Using TypeScript, reading user properties requires something like this:
It would be better if the userProperties (in mqtt-packet) were changed from being {object} to being {[index: string]: string}.
It would also be better if the on message callback required an IPublishPacket rather than the more generic Packet.
Changing both these would allow type assignments to be removed and the TypeScript code could be changed to:
Linked to mqttjs/mqtt-packet#102
AB#9320335
The text was updated successfully, but these errors were encountered: