Closed fengxinming closed 5 years ago
if ( ${superName} ) ${name}.__proto__ = ${superName};
This makes inheritance of static members work, for code like this:
class A {
static method() { return 1 }
}
class B extends A {}
B.method() == 1
@goto-bus-stop Great answer, thanks!