in this case, we extended a Kotlin class in our TS code ,
g35_1
and
h35_1
are properties declared in our Kotlin code
a
Artem Kobzar
09/06/2023, 11:29 AM
And what do you expect to get?
n
Nathan Tamez
09/06/2023, 11:33 AM
Sorry, I got interrupted i was wondering if theres any nice way to keep the properties actual names,
a
Artem Kobzar
09/06/2023, 12:10 PM
Sure, there are two ways to do that.
If you want to have less impact on the generated code (if the class will be not in usage, this class will be deleted) you can use @JsName annotation with the name you want to keep on the properties.
For some special cases (if you want to have ability to extend the class from the TS code) you could use @JsExport on the whole class, but the @JsExport annotation also adds a few restrictions, so, I feel that the @JsName will be more prefered.