This project is read-only.

Setter: automatically pass the parameter as "value"

Topics: General
May 12, 2013 at 2:00 PM
We know from C#, that property setters automatically get the parameter "value" handed over.
set Property() { = value; }
this would save developers some time because we always have to write
set Property(value: PropertyType) { = value; }
Are there any plans to implement this behavior into the compiler?
May 13, 2013 at 4:24 PM
TypeScript uses the get/set approach from JavaScript (rather than C#). I suspect, since we're aligning with JavaScript, we won't add additional syntactic sugar like what C# provides.