TypeScript/tests/baselines/reference/parameterPropertyInitializerInInitializers.js
2014-07-12 17:30:19 -07:00

15 lines
348 B
TypeScript

//// [parameterPropertyInitializerInInitializers.ts]
class Foo {
constructor(public x: number, public y: number = x) { }
}
//// [parameterPropertyInitializerInInitializers.js]
var Foo = (function () {
function Foo(x, y) {
if (y === void 0) { y = x; }
this.x = x;
this.y = y;
}
return Foo;
})();