Phil Kagebein
08/26/2025, 9:35 PM2.1.20
-> 2.2.10
. Previously, we used KtMap.getInstance().fromJsMap()
to convert a JS Map to a Kotlin map so that the client can send some data back to KM. However, in 2.2.10
getInstance()
is not available anymore. Is there a more preferred way to do these sorts of operators for objects like KtMap
or KtList
?Edoardo Luppi
08/27/2025, 8:36 AMEdoardo Luppi
08/27/2025, 8:46 AMKtMap.getInstance()
.
However the generated TS declarations are incorrect.
This might be https://youtrack.jetbrains.com/issue/KT-79926, @Artem Kobzar should be able to confirm.Artem Kobzar
08/27/2025, 9:40 AMgetInstance
from the d.ts
.
However, since the 2.3.0 for the KtMap
and KtList
the getInstance
will be dropped and you could use just KtMap.fromJsMap
from both ESM and CJS (we did it to eliminate differences between the module systems to make the migration smoother)Phil Kagebein
08/28/2025, 3:19 PM