29 lines
602 B
TypeScript
29 lines
602 B
TypeScript
//// [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
|