Skip to content

Improved TypeScript declarations for userProperties #1249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 15, 2021
Merged

Improved TypeScript declarations for userProperties #1249

merged 4 commits into from
Jun 15, 2021

Conversation

bkp7
Copy link
Contributor

@bkp7 bkp7 commented Feb 12, 2021

userProperties changed from being object to being {[index: string]: string[]} (name-value string pairs)

fixes #1248

Not all tests are passing, but same test fail as on Master

bkp7 added 4 commits February 12, 2021 10:17
userProperties changed from being object to being {[index: string]: string[]} (name-value string pairs)

Also changed OnConnectCallback and OnMessageCallback to use IConnectPacket and IPublishPacket respectively. These are the specific packets relevant to these callbacks rather than the more generic Packet.

NB Also changed package.json to link to version of mqtt-packet with the equivalent changes which are required. This needs to be updated prior to Pulling.
dealt with in separate PR
changes to client.d.ts to fix missing event types and also to specifically refer to specific packet types rather than the generic 'Packet'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Current Typescript definitions are difficult to use to read userProperties
2 participants