Map is a particular Kotlin interface which is not mapped to any specific JavaScript type. You can’t cast a map-like JS object to kotlin.Map.
I can see couple of options:
- Use external type with Alternative to @nativeGetter
- Convert native object to HashMap How to access native JS object as a Map<String, Any>?