ForteScarlet/kotlin-suspend-transform-compiler-plugin

Converting Types for JS API?

ScottPierce opened this issue · 1 comments

There are certain types that JS doesn't work well with Kotlin i.e. if you have a function that returns a List<String>. It'd be nice if there was a way to automatically convert Kotlin collections to their correct JS counterparts.

List to Array
Map to JS Object
I'm sure there are others.

🤔️ This does seem to be a problem. Perhaps some way of providing support for type conversion of returned results (and which could be user-defined and not limited to JS) would be considered.
I haven't thought about it yet though, and the JS target is not available at the moment, so maybe I'll come back to it after KT-53993 is fixed or #29 is implemented 😉 .