-
Couldn't load subscription status.
- Fork 12
Paho MQTT library #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to rename the directory v0 according this version, e.g. to v3
externals/paho-mqtt/v0/src/index.kt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: missed space before dynamic
externals/paho-mqtt/v0/src/index.kt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API test should be moved to separate directory, see how it's done jquery
externals/paho-mqtt/v0/src/index.kt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add information about yourself, like:
// Contributed by: name/nick <link to github user or your email>
externals/paho-mqtt/v0/src/index.kt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: missed spaces after //
externals/paho-mqtt/v0/src/index.kt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried to convert https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/paho-mqtt/ using ts2kt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried ts2kt on paho-mqtt typescript but I got an error.
I tried it on jquery typescript and everything was fine... so I think my proceedings were all right.
This is the error I got
ts2kt version: 0.1.3
Converting index.d.ts
fs.js:640
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open 'C:\module.d.ts'
at Error (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.readFileSync (fs.js:508:33)
at getScriptSnapshotFromFile (C:\Users\Simone\AppData\Roaming\npm\node_modules\ts2kt\ts2kt.js:5398:46)
at translate (C:\Users\Simone\AppData\Roaming\npm\node_modules\ts2kt\ts2kt.js:5623:21)
at translateToDir (C:\Users\Simone\AppData\Roaming\npm\node_modules\ts2kt\ts2kt.js:5177:26)
at main (C:\Users\Simone\AppData\Roaming\npm\node_modules\ts2kt\ts2kt.js:5387:5)
at C:\Users\Simone\AppData\Roaming\npm\node_modules\ts2kt\ts2kt.js:6243:3
at Object. (C:\Users\Simone\AppData\Roaming\npm\node_modules\ts2kt\ts2kt.js:6246:2)
at Module._compile (module.js:570:32)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please file an issue to Kotlin/ts2kt
externals/paho-mqtt/v0/src/index.kt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According the docs it should be called host.
externals/paho-mqtt/v0/src/index.kt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be an interface
externals/paho-mqtt/v0/src/index.kt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO ConnectOptions is a better name for this, also looks like most of properties can be optional
@simonegiacomelli, thank you for the contribution! (You are first ;))
Would be nice to get some improvements (see comments) before we merge it.
... to ConnectOptions
@bashor I fixed all your requests except the optional parameters of ConnectOptions
Nice! Thank you, @simonegiacomelli!
These are an incomplete but working header for Paho MQTT javascript library by Eclipse.
I followed this advice
https://discuss.kotlinlang.org/t/kotlin-headers-for-mqtt-javascript-library/6726/5