TypeScript/tests/baselines/reference/parameterPropertyReferencingOtherParameter.js

16 lines
349 B
JavaScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [parameterPropertyReferencingOtherParameter.ts]
class Foo {
constructor(public x: number, public y: number = x) { }
}
//// [parameterPropertyReferencingOtherParameter.js]
var Foo = (function () {
function Foo(x, y) {
if (y === void 0) { y = x; }
this.x = x;
this.y = y;
}
return Foo;
})();