Hi guys, I would just like to give a bit more visi...
# javascript
j
Hi guys, I would just like to give a bit more visibility to the following issue: https://youtrack.jetbrains.com/issue/KT-31799 This basically prevents me from writing external declarations for the
webstomp-client
NPM library. Kotlin just doesn't allow me to express this Javascript in a type safe way, because it believes it can't translate it to valid JS, which is not true. Is there any workaround I could use?
t
Untitled.kt
j
Thanks a lot, I didn't know about this trick!
i
By the way, this get/set repetition could be factored out to a property delegate: https://pl.kotl.in/hgayaCOAz
j
This looks great, but does that work when writing external declarations for existing JavaScript code?
@ilya.gorbunov The property delegate needs to take the actual JS name of the property as parameter, though, but I get the idea 🙂