TypeScript provides a convenient syntax for constructor parameter properties, allowing you to write code like this:
constructor(a, public b, private _c) {}
This is essentially shorthand for the following code:
constructor(a, b, _c) {
this.b = b;
this._c = _c;
}
Considering that ECMAScript proposals are introducing features previously exclusive to TypeScript, such as class fields and their visibility, it would not be surprising to see constructor parameter properties added in the future.
Are there any ongoing proposals or efforts to incorporate constructor parameter properties into ECMAScript? Are there Babel plugins available that offer similar syntactic sugar?
Despite my search, I have not come across any specific information on this topic. However, it's possible that different terminology could be used to describe the same functionality.