Is there any form of JS reflection in Kotlin?
# javascript
s
Is there any form of JS reflection in Kotlin?
m
I'm assuming you mean access to Kotlins reflection API in KotlinJs code. The answer to that is "very limited" - https://kotlinlang.org/docs/reference/js-reflection.html
s
lol - I sometimes forget class names is considered reflection. Thanks 🙂
a
is there any form of JS reflection in JS?
a
Some JS reflection is covered in https://github.com/JetBrains/kotlin-wrappers/tree/master/kotlin-extensions. But you need to be careful and rememeber about kotlin js name mangling. Names in kotlin code are not always the same they will be in js.