TypeScript/tests/baselines/reference/augmentedTypesClass2.js

68 lines
1.1 KiB
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [augmentedTypesClass2.ts]
// Checking class with other things in type space not value space
// class then interface
2014-10-01 02:15:18 +02:00
class c11 { // error
2014-07-13 01:04:16 +02:00
foo() {
return 1;
}
}
interface c11 { // error
bar(): void;
}
// class then class - covered
// class then enum
class c33 {
foo() {
return 1;
}
}
enum c33 { One };
// class then import
class c44 {
foo() {
return 1;
}
}
//// [augmentedTypesClass2.js]
// Checking class with other things in type space not value space
// class then interface
2014-07-13 01:04:16 +02:00
var c11 = (function () {
function c11() {
}
c11.prototype.foo = function () {
return 1;
};
return c11;
})();
// class then class - covered
// class then enum
2014-07-13 01:04:16 +02:00
var c33 = (function () {
function c33() {
}
c33.prototype.foo = function () {
return 1;
};
return c33;
})();
var c33;
(function (c33) {
c33[c33["One"] = 0] = "One";
})(c33 || (c33 = {}));
;
// class then import
2014-07-13 01:04:16 +02:00
var c44 = (function () {
function c44() {
}
c44.prototype.foo = function () {
return 1;
};
return c44;
})();