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

26 lines
649 B
JavaScript

//// [augmentedTypesModules3.ts]
//// module then class
module m3 { }
class m3 { } // ok since the module is not instantiated
module m3a { var y = 2; }
class m3a { foo() { } } // error, class isn't ambient or declared before the module
//// [augmentedTypesModules3.js]
var m3 = (function () {
function m3() {
}
return m3;
})(); // ok since the module is not instantiated
var m3a;
(function (m3a) {
var y = 2;
})(m3a || (m3a = {}));
var m3a = (function () {
function m3a() {
}
m3a.prototype.foo = function () {
};
return m3a;
})(); // error, class isn't ambient or declared before the module