TypeScript/tests/baselines/reference/constructorParameterProperties.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

41 lines
653 B
JavaScript

//// [constructorParameterProperties.ts]
class C {
y: string;
constructor(private x: string) { }
}
var c: C;
var r = c.y;
var r2 = c.x; // error
class D<T> {
y: T;
constructor(a: T, private x: T) { }
}
var d: D<string>;
var r = d.y;
var r2 = d.x; // error
var r3 = d.a; // error
//// [constructorParameterProperties.js]
var C = (function () {
function C(x) {
this.x = x;
}
return C;
})();
var c;
var r = c.y;
var r2 = c.x; // error
var D = (function () {
function D(a, x) {
this.x = x;
}
return D;
})();
var d;
var r = d.y;
var r2 = d.x; // error
var r3 = d.a; // error