```We are trying to use kotlin multiplatform plugi...
# javascript
a
Copy code
We are trying to use kotlin multiplatform plugin in our project. We have kotlin code as follows
@JsName("Cart") class Cart(val items: List<CartItem>, val totalPayableAmount: Double) @JsName("CartItem") class CartItem(val categoryCode: String, val totalPremium: Double) class Validator(private val cart: Cart) { @JsName("isValid") fun isValid(): Boolean { return if (cart.totalPayableAmount < 5000) { cart.items.any { it.categoryCode == "abcd" } } else { false } } }
Copy code
When we try to use compiled js code in html, we get error as follows

`n.iterator_24 is not a function`

which we suspect is because of `any` that we have used in kotlin. Does anyone has any idea reagarding this?
We are using IR compiler
r
Can you share the JS usage code as well?
t
I IR you need use
@JsExport
annotation to export classes. Duplicated `@JsName`s will be redundant in this case
a
@rnett
As per this document List, Set and Map are not mapped to any JS type
Is there any other document which i can refer to know what Kotlin type I should be using whose equivalent in js is object
a
@Ashish Kumar Joy I had your same problem, please look here: https://youtrack.jetbrains.com/issue/KT-45427