if i type this simple typescript code:
class Point2D
{
constructor(public x: number, public y: number)
{
}
}
and look at the generated js:
var Point2D = (function () {
function Point2D(x, y) {
this.x = x;
this.y = y;
}
return Point2D;
})();
my question: how does above differ from:
function Point2D(x, y) {
this.x = x;
this.y = y;
}
if no difference, then above is much simpler