kotlin-suspend-transform-compiler-plugin icon indicating copy to clipboard operation
kotlin-suspend-transform-compiler-plugin copied to clipboard

Converting Types for JS API?

Open ScottPierce opened this issue 2 years ago • 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.

ScottPierce avatar Jun 28 '23 22:06 ScottPierce

🤔️ 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 😉 .

ForteScarlet avatar Jun 29 '23 01:06 ForteScarlet