Jan Stoltman
06/18/2019, 1:16 PMJan Stoltman
06/18/2019, 1:17 PMSvyatoslav Kuzmich [JB]
06/18/2019, 1:27 PM// Kotlin
interface I
class C : I
// Generated JS
function I() {
}
I.$metadata$ = {
kind: Kind_INTERFACE,
simpleName: 'I',
interfaces: []
};
function C() {
}
C.$metadata$ = {
kind: Kind_CLASS,
simpleName: 'C',
interfaces: [I]
};
If you own K/JS code with given interface you can:
a. make abstract class in K/JS and extend it like a regular JS class
b. make interface external
and create JS objects with matching structureJan Stoltman
06/18/2019, 1:29 PMSvyatoslav Kuzmich [JB]
06/18/2019, 1:30 PMSvyatoslav Kuzmich [JB]
06/18/2019, 1:31 PMJan Stoltman
06/18/2019, 1:38 PMU75957
06/19/2019, 7:25 AMAnd guarantees for as-is member names in JSNot guarantees) https://kotlinlang.slack.com/archives/C0B8L3U69/p1559335458013500 https://kotlinlang.slack.com/archives/C0B8L3U69/p1559335973015500
Svyatoslav Kuzmich [JB]
06/19/2019, 9:44 AM@JsName
or external
properties are still there. What looks like a mangled property is likely a property's backing field which is not supposed to be accessed directly.