2014-07-13 01:04:16 +02:00
|
|
|
//// [mergedInterfacesWithIndexers2.ts]
|
|
|
|
// indexers should behave like other members when merging interface declarations
|
|
|
|
|
|
|
|
interface A {
|
|
|
|
[x: number]: string; // error
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface A {
|
|
|
|
[x: string]: { length: string }; // error
|
|
|
|
}
|
|
|
|
|
|
|
|
interface A2 {
|
|
|
|
[x: number]: string;
|
|
|
|
'a': number; //error
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface A2 {
|
|
|
|
[x: string]: { length: number };
|
|
|
|
1: { length: number }; // error
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//// [mergedInterfacesWithIndexers2.js]
|
2014-08-19 19:43:13 +02:00
|
|
|
// indexers should behave like other members when merging interface declarations
|