51 lines
792 B
TypeScript
51 lines
792 B
TypeScript
//// [augmentedTypesInterface.ts]
|
|
// interface then interface
|
|
|
|
interface i {
|
|
foo(): void;
|
|
}
|
|
|
|
interface i {
|
|
bar(): number;
|
|
}
|
|
|
|
// interface then class
|
|
interface i2 { // error
|
|
foo(): void;
|
|
}
|
|
|
|
class i2 { // error
|
|
bar() {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
// interface then enum
|
|
interface i3 { // error
|
|
foo(): void;
|
|
}
|
|
enum i3 { One }; // error
|
|
|
|
// interface then import
|
|
interface i4 {
|
|
foo(): void;
|
|
}
|
|
|
|
//import i4 = require(''); // error
|
|
|
|
//// [augmentedTypesInterface.js]
|
|
// interface then interface
|
|
var i2 = (function () {
|
|
function i2() {
|
|
}
|
|
i2.prototype.bar = function () {
|
|
return 1;
|
|
};
|
|
return i2;
|
|
})();
|
|
var i3;
|
|
(function (i3) {
|
|
i3[i3["One"] = 0] = "One";
|
|
})(i3 || (i3 = {}));
|
|
; // error
|
|
//import i4 = require(''); // error
|