I would like to be able to nest classes, functionality that is available in many other languages, but not JS.
Example:
class A {
constructor() {/* ... */}
class B {/* ... */}
}
a = new A();
b = new a.B();
b2 = new A.B(); // same as b.
I would like to be able to nest classes, functionality that is available in many other languages, but not JS.
Example:
class A {
constructor() {/* ... */}
class B {/* ... */}
}
a = new A();
b = new a.B();
b2 = new A.B(); // same as b.
You can already do that. The syntax is just not the same some other languages:
class A {
constructor() {/* ... */}
static B = class {/* ... */}
}