mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 11:13:43 +03:00
22 lines
356 B
TypeScript
22 lines
356 B
TypeScript
// 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
|
|
}
|