TypeScript/tests/baselines/reference/parameterPropertyInitializerInInitializers.js

15 lines
348 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [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;
})();