var Namespace = {
FooClass: function () {
console.log('FooClass.constructor');
}
};
class BarClass extends Namespace.FooClass {
constructor () {
console.log('FooClass.constructor');
super();
}
}
new BarClass();
Result JS code:
var Namespace = {
FooClass: function () {
console.log('FooClass.constructor');
}
};
var BarClass = (function (super$0) {
var MIXIN$0 = function (t, s) {
for (var p in s) {
if (s.hasOwnProperty(p)) {
Object.defineProperty(t, p, Object.getOwnPropertyDescriptor(s, p));
}
}
return t
};
MIXIN$0(BarClass, super$0);
function BarClass() {
console.log('FooClass.constructor');
super$0.call(this);
};
return BarClass;
})();
new BarClass();
No class extends, as we can see. Expected correct extends.
EcmaScript 6 code:
Result JS code:
No class extends, as we can see. Expected correct extends.