ECMAScript Proposal For Constructor Parameter Properties
In TypeScript, there is convenient syntax, constructor parameter properties: constructor(a, public b, private _c) {} Which is syntactic sugar for: constructor(a, b, _c) { this.b
Solution 1:
Are there proposals or other initiatives for constructor parameter properties in ECMAScript?
No.
Are there Babel transforms that support this or similar syntactic sugar?
Use typescript
transform with babel : https://babeljs.io/docs/en/next/babel-preset-typescript.html
OR
Just use typescript
by itself as that provides the transform 🌹
Post a Comment for "ECMAScript Proposal For Constructor Parameter Properties"