swc/tests/tsc-references/classes/mixinAbstractClasses/input.ts/es2015.1.normal/output.js

26 lines
562 B
JavaScript

function Mixin(baseClass) {
class MixinClass extends baseClass {
mixinMethod() {
}
}
return MixinClass;
}
class ConcreteBase {
baseMethod() {
}
}
class AbstractBase {
}
class DerivedFromConcrete extends Mixin(ConcreteBase) {
}
const wasConcrete = new DerivedFromConcrete();
wasConcrete.baseMethod();
wasConcrete.mixinMethod();
class DerivedFromAbstract extends Mixin(AbstractBase) {
abstractBaseMethod() {
}
}
const wasAbstract = new DerivedFromAbstract();
wasAbstract.abstractBaseMethod();
wasAbstract.mixinMethod();