proposal-class-fields
proposal-class-fields copied to clipboard
Orthogonally-informed combination of public and private fields proposals
in #272, I made a point about the nature of a class that is being lost in this proposal, namely, the breaking of the guarantees about the relationship between base...
We should write a combined piece of specification text covering this proposal, [static class features](https://github.com/tc39/proposal-static-class-features/), and [private methods](https://github.com/tc39/proposal-private-methods). The combined version would be more readable than the current three separate...
@caitp ran into some ambiguity in the way the specification is worded here. I'm not sure whether we need a fix per se (e.g., #40), or whether we just need...
The name makes sense purely in the context of this specification, but it becomes strange in the context of private methods, decorators, etc. cc @tjcrowder
When attempting to assign a function to a private field, it creates a new instance of the function for every definition. This is not ideal, and means you are unnecessarily...
From the README: > Public fields are shipping in Chrome 72 with `[[Define]]` semantics, and this decision on semantics is unlikely to be revisited. As I stated [on January 4](https://github.com/tc39/proposal-class-fields/issues/203#issuecomment-451623437),...
It is a common pattern to have a parent class that sets the properties of children, but the current TC39 spec introduces a problem with this pattern: children properties are...
Use [[Set]] by default, add `define` keyword. (was: TypeScript class fields have [[Set]] semantics.)
Class-fields in TypeScript have `[[Set]]` semantics. Foresee code breaking when JavaScript projects convert to TypeScript (or vice versa), and the pain caused from hard-to-find bugs, because of JavaScript class-fields using...
The following should work, and it would mean that we can provide much better functionality: ```js class Foo { # x = 5 test() { console.log(this .# x) // it...
The goal of this thread is to begin consolidating and documenting the motivations and considerations that led to the current proposal. I think this information will be very helpful for...