U75957
06/19/2019, 7:15 AMprototype
like this SomeClass.prototype.prop = "value"
. But when I do:
object SomeClass : SomeLibClass() {
override var prop = "value"
}
it produce such js code:
Object.defineProperty(SomeClass.prototype, 'prop', {
get: function () {
return this.prop_x8fmwh$_0;
},
set: function (prop) {
this.prop_x8fmwh$_0 = prop;
}
});
And it does not work. Looks like it's not equal to SomeClass.prototype.prop = "value"
. Why? And how to force kotlin/js produce just SomeClass.prototype.prop = "value"
?spand
06/19/2019, 7:35 AMprop
on a companion objectU75957
06/19/2019, 7:56 AMprototype
and companion object
are completely different concepts. Of course it does not work.anton.bannykh
06/19/2019, 2:31 PMSomeClass.prototype = <initializer>
anton.bannykh
06/19/2019, 2:31 PManton.bannykh
06/19/2019, 2:35 PM