2014-07-13 01:04:16 +02:00
|
|
|
//// [augmentedTypesInterface.ts]
|
|
|
|
// interface then interface
|
|
|
|
|
|
|
|
interface i {
|
|
|
|
foo(): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface i {
|
|
|
|
bar(): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
// interface then class
|
2014-10-01 02:15:18 +02:00
|
|
|
interface i2 { // error
|
2014-07-13 01:04:16 +02:00
|
|
|
foo(): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
class i2 { // error
|
|
|
|
bar() {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// interface then enum
|
2014-10-01 02:15:18 +02:00
|
|
|
interface i3 { // error
|
2014-07-13 01:04:16 +02:00
|
|
|
foo(): void;
|
|
|
|
}
|
|
|
|
enum i3 { One }; // error
|
|
|
|
|
|
|
|
// interface then import
|
|
|
|
interface i4 {
|
|
|
|
foo(): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
//import i4 = require(''); // error
|
|
|
|
|
|
|
|
//// [augmentedTypesInterface.js]
|
2014-08-19 19:43:13 +02:00
|
|
|
// interface then interface
|
2014-07-13 01:04:16 +02:00
|
|
|
var i2 = (function () {
|
|
|
|
function i2() {
|
|
|
|
}
|
|
|
|
i2.prototype.bar = function () {
|
|
|
|
return 1;
|
|
|
|
};
|
|
|
|
return i2;
|
|
|
|
})();
|
|
|
|
var i3;
|
|
|
|
(function (i3) {
|
|
|
|
i3[i3["One"] = 0] = "One";
|
|
|
|
})(i3 || (i3 = {}));
|
|
|
|
;
|
2014-12-03 01:09:41 +01:00
|
|
|
//import i4 = require(''); // error
|