Join Slack
Powered by
Is there any form of JS reflection in Kotlin?
# javascript
s
spierce7
10/01/2020, 7:53 PM
Is there any form of JS reflection in Kotlin?
m
Mranders
10/01/2020, 8:02 PM
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
spierce7
10/01/2020, 8:07 PM
lol - I sometimes forget class names is considered reflection. Thanks 🙂
a
andylamax
10/02/2020, 3:05 AM
is there any form of JS reflection in JS?
a
altavir
10/02/2020, 6:42 AM
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.
2
Views
Open in Slack
Previous
Next