Robert Jaros
09/24/2023, 6:37 PMexternal fun init(modules: Array<JsAny>): Unit
, because array types are not supported. But I can use external fun init(modules: JsArray<JsAny>): Unit
and create JsArray with the following "trick" (see thread).function jsArrayOf() {
return arguments
}
export {jsArrayOf};
@file:JsModule("jsmodule.mjs")
external fun jsArrayOf(vararg obj: JsAny): JsArray<JsAny>
init
function with an array parameter:
init(jsArrayOf(..., ..., ...))
And it works fine. So why the compiler can't make the same trick and allow array parameters to external functions?