5a7500ca5e
This is important for incremental parsing, as it is where we can attach parse errors at the end of the file to. Also, it helps with things like emitting comments at the end of the file.
52 lines
783 B
JavaScript
52 lines
783 B
JavaScript
//// [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 = {}));
|
|
;
|
|
//import i4 = require(''); // error
|