- 被继承类1
const BaseClass = (superClass = null) => {
superClass = superClass || class Empty {}
return class extends superClass {
constructor() {
super();
}
}
}
- 被继承类2
const BaseClass2 = (superClass = null) => {
superClass = superClass || class Empty {}
return class extends superClass {
constructor() {
super();
}
}
}
- 继承类
class MainClass extends BaseClass2(BaseClass1()){
constructor() {
super();
}
}
网友评论