I have a Kotlin function written that consumes a List<String>
. The function has an annotation with @JsName
so that I can call this function from JavaScript. I cannot determine though what I am supposed to pass into this function. Passing an JavaScript Array doesn't work because the Kotlin-JS code calls iterator
on the object. Furthermore, the names in the Kotlin standard library are all mangled; so I cannot in any reliable way call say listOf
in JavaScript and pass the results to function.
The question is then how beyond trivial types (numbers, string, etc.) are we supposed to create and pass to objects functions if the Kotlin standard library names are mangled?