hi there, have any idea about converting js(java script) to kotlin/js any thing plugin, tool or library?
I don’t think it’s possible, not really. JS doesn’t have any type information and kotlin is strongly typed. Such a tool would need to guess every single type for every single expression, based only on how it is used. This is pretty much impossible.
Converting type script however should be possible, but I don’t think there are any tools out there. At least I don’t know any.
I do not think it is possible to convert general JS code to kotlin. The languages are far too different for that. It is not even possible to write nice kotlin wrappers for JS.
It could be possible to create a translator with lots of dynamic
types on the Kotlin side.
Yeah but that would not be Kotlin! What’s the point? Better to keep JS as is and provide externals!
To add to other points, the general coding styles of Kotlin and JavaScript are very different. A converter would be completely useless unless you would like to generate badly written code.