tc39 / proposal-static-class-features

The static parts of new class features, in a separate proposal
https://arai-a.github.io/ecma262-compare/?pr=1668
127 stars 27 forks source link

static inner class #34

Closed rahbari closed 6 years ago

rahbari commented 6 years ago

Does this proposal consider static inner class definition?

class Outer {
    static inner = class {}
    static #inner = class {}
}

instead of

class Outer {}
Outer.inner = class {}

this syntax could be so much helpful.

ljharb commented 6 years ago

since those are class expressions, I’m not sure why it wouldn’t Just Work.

littledan commented 6 years ago

Yep, agree with @ljharb that it'll just work.