my friend logged this issue: <https://youtrack.jet...
# javascript
d
my friend logged this issue: https://youtrack.jetbrains.com/issue/KT-43728 - would it be a better implementation strategy to
@JsExport
the
data
class instead of the
interface
?
s
Haven’t looked at the problem in depth. Adding
external
modifier to JsExport interface will probably workaround the issue.
Exporting a class with constructor will work too. Doesn’t have to be
data
class.
d
kk - thank you
@bbil
b
@Svyatoslav Kuzmich [JB] Thanks, this did indeed generate the javascript that I was expecting. The only problem I'm having now is that I can't define an
external interface
in the
commonMain
of a MPP. So, I can't share the interface definition... and I can't do:
Copy code
@JsExport external interface A : AFromCommon
Because I get a compile error about an external interface can't extend a non-external one
s
@bbil As a workaround you can do
expect interface
with
actual external interface
in JS
b
thank you again, I'll play around with that