2014-07-13 01:04:16 +02:00
|
|
|
//// [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]
|
2014-08-14 15:42:18 +02:00
|
|
|
//// class then var
|
2014-07-13 01:04:16 +02:00
|
|
|
var c1 = (function () {
|
|
|
|
function c1() {
|
|
|
|
}
|
|
|
|
c1.prototype.foo = function () {
|
|
|
|
};
|
|
|
|
return c1;
|
|
|
|
})();
|
2014-08-15 22:18:54 +02:00
|
|
|
var c1 = 1; // error
|
2014-08-14 15:42:18 +02:00
|
|
|
//// class then enum
|
2014-07-13 01:04:16 +02:00
|
|
|
var c4 = (function () {
|
|
|
|
function c4() {
|
|
|
|
}
|
|
|
|
c4.prototype.foo = function () {
|
|
|
|
};
|
|
|
|
return c4;
|
|
|
|
})();
|
|
|
|
var c4;
|
|
|
|
(function (c4) {
|
|
|
|
c4[c4["One"] = 0] = "One";
|
2014-08-15 23:32:08 +02:00
|
|
|
})(c4 || (c4 = {})); // error
|