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

32 lines
612 B
JavaScript

//// [augmentedTypesClass.ts]
//// class then var
class c1 { public foo() { } }
var c1 = 1; // error
//// class then enum
class c4 { public foo() { } }
enum c4 { One } // error
//// [augmentedTypesClass.js]
//// class then var
var c1 = (function () {
function c1() {
}
c1.prototype.foo = function () {
};
return c1;
})();
var c1 = 1; // error
//// class then enum
var c4 = (function () {
function c4() {
}
c4.prototype.foo = function () {
};
return c4;
})();
var c4;
(function (c4) {
c4[c4["One"] = 0] = "One";
})(c4 || (c4 = {})); // error