TypeScript/tests/baselines/reference/augmentedTypesClass3.js
Cyrus Najmabadi 5a7500ca5e Add a dedicated 'EndOfFile' token to a SourceFile.
This is important for incremental parsing, as it is where we can attach parse errors at the end of
the file to.  Also, it helps with things like emitting comments at the end of the file.
2014-12-02 16:09:41 -08:00

56 lines
1.1 KiB
JavaScript

//// [augmentedTypesClass3.ts]
// class then module
class c5 { public foo() { } }
module c5 { } // should be ok
class c5a { public foo() { } }
module c5a { var y = 2; } // should be ok
class c5b { public foo() { } }
module c5b { export var y = 2; } // should be ok
//// class then import
class c5c { public foo() { } }
//import c5c = require('');
//// [augmentedTypesClass3.js]
// class then module
var c5 = (function () {
function c5() {
}
c5.prototype.foo = function () {
};
return c5;
})();
var c5a = (function () {
function c5a() {
}
c5a.prototype.foo = function () {
};
return c5a;
})();
var c5a;
(function (c5a) {
var y = 2;
})(c5a || (c5a = {})); // should be ok
var c5b = (function () {
function c5b() {
}
c5b.prototype.foo = function () {
};
return c5b;
})();
var c5b;
(function (c5b) {
c5b.y = 2;
})(c5b || (c5b = {})); // should be ok
//// class then import
var c5c = (function () {
function c5c() {
}
c5c.prototype.foo = function () {
};
return c5c;
})();
//import c5c = require('');