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
Some of us feel like it's a good idea to get consistent emit. Picking a date in the future to deprecate and eventually remove is the proposed plan. But need to experiment first.
Maybe 6.0 deprecation is the plan.
This has only been available since ES2022 though!
6.0 deprecation = 6.5 removal, which is just over 2 years from now.
Aside: we should investigate parameter properties in ECMAScript.
Ordering Parameter Properties and Class Fields
#45995
When we adjusted our class field emit (with
useDefineForClassFields), we also adjusted the relative ordering of class fields and parameter properties.Under JS, class fields run before the body of the constructor.
Under TS, previously, class fields ran after parameter properties, but before the body of the constructor.
Under
useDefineForClassFieldswe error on any access to parameter properties, but otherwise it's fine.Should we adjust the ordering to be consistent?
useDefineForClassFieldswas introduced as a legacy behavior to avoid breaks, why break people?We could run a PR where it always errors, see what breaks.
Is there something clever we could do with emit?
The tough part is that most codebases that would be affected by running on GitHub won't be uncovered. Typically these are more mature codebases.
Could always do a codemod. We typically rely on quick fixes here.
Some of us feel like it's a good idea to get consistent emit. Picking a date in the future to deprecate and eventually remove is the proposed plan. But need to experiment first.
Maybe 6.0 deprecation is the plan.
This has only been available since ES2022 though!
6.0 deprecation = 6.5 removal, which is just over 2 years from now.
Aside: we should investigate parameter properties in ECMAScript.