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

34 lines
612 B
JavaScript

//// [constructorDefaultValuesReferencingThis.ts]
class C {
constructor(x = this) { }
}
class D<T> {
constructor(x = this) { }
}
class E<T> {
constructor(public x = this) { }
}
//// [constructorDefaultValuesReferencingThis.js]
var C = (function () {
function C(x) {
if (x === void 0) { x = this; }
}
return C;
})();
var D = (function () {
function D(x) {
if (x === void 0) { x = this; }
}
return D;
})();
var E = (function () {
function E(x) {
if (x === void 0) { x = this; }
this.x = x;
}
return E;
})();