You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
static initialization blocks do not parse prototype #51786
I can understand if Foo.prototype.outerIIFE and Foo.prototype.innerThis are not working. But Foo.prototype.inner should be parsed. (bonus if we can add the other ones).
Usage would be to avoid having code appended to the end of a class, and instead, inside the class improving code clarity. That was one of the goals of implementing static initialization blocks. Sometimes properties need to be defined before instance initialization instead of after constructor() is called (eg: HTMLElement.observedAttributes needing to be ready before constructor() is called.). I believe prototype checking was added around Typescript 3.0, and static class blocks didn't exist yet.
Activity