TypeScript/tests/baselines/reference/constructorParameterProperties2.js
Sheetal Nandi 6ab3adfd43 Modified the emitComment logic to handle emitting leading or trailing spaces depending on flags
Leading comments have trailing separator while trailing comments have leading space
This removes the extra trailing space in the trailing comments
2014-08-15 14:32:08 -07:00

50 lines
752 B
JavaScript

//// [constructorParameterProperties2.ts]
class C {
y: number;
constructor(y: number) { } // ok
}
var c: C;
var r = c.y;
class D {
y: number;
constructor(public y: number) { } // error
}
var d: D;
var r2 = d.y;
class E {
y: number;
constructor(private y: number) { } // error
}
var e: E;
var r3 = e.y; // error
//// [constructorParameterProperties2.js]
var C = (function () {
function C(y) {
} // ok
return C;
})();
var c;
var r = c.y;
var D = (function () {
function D(y) {
this.y = y;
} // error
return D;
})();
var d;
var r2 = d.y;
var E = (function () {
function E(y) {
this.y = y;
} // error
return E;
})();
var e;
var r3 = e.y; // error