TypeScript/tests/baselines/reference/duplicateStringIndexers.js

48 lines
909 B
JavaScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [duplicateStringIndexers.ts]
// it is an error to have duplicate index signatures of the same kind in a type
module test {
interface Number {
[x: string]: string;
[x: string]: string;
}
2014-07-13 01:04:16 +02:00
interface String {
[x: string]: string;
[x: string]: string;
}
2014-07-13 01:04:16 +02:00
interface Array<T> {
[x: string]: T;
[x: string]: T;
}
2014-07-13 01:04:16 +02:00
class C {
[x: string]: string;
[x: string]: string;
}
2014-07-13 01:04:16 +02:00
interface I {
[x: string]: string;
[x: string]: string;
}
2014-07-13 01:04:16 +02:00
var a: {
[x: string]: string;
[x: string]: string;
}
2014-07-13 01:04:16 +02:00
}
//// [duplicateStringIndexers.js]
2014-08-14 15:53:37 +02:00
// it is an error to have duplicate index signatures of the same kind in a type
var test;
(function (test) {
var C = (function () {
function C() {
}
return C;
})();
var a;
})(test || (test = {}));