Can someone help me understand why MutableMaps in ...
# javascript
j
Can someone help me understand why MutableMaps in Kotlin JS don't have all the methods I expect they'd have? E.g. put().
t
Copy code
map.put //this is a property get
map.put(key, value) //put fun call
map[key] = value // sugar for put
j
There isn't a put function defined on the map object returned by Kotlin. This evaluation is being done in a Javascript console.
🤔 1
z
Is the method name mangled? AFAIK overloaded methods get name mangled when compiled to Javascript.
j
No, I don't see any mangled method for put, or many of the other API specified methods
I think that MutableMap is an interface..which is why these aren't defined
1