mirror of
https://github.com/swc-project/swc.git
synced 2024-12-27 15:42:51 +03:00
32 lines
462 B
TypeScript
32 lines
462 B
TypeScript
// Multiple indexers of the same type are an error
|
|
|
|
class C {
|
|
[x: number]: string;
|
|
[x: number]: string;
|
|
}
|
|
|
|
interface I {
|
|
[x: number]: string;
|
|
[x: number]: string;
|
|
}
|
|
|
|
var a: {
|
|
[x: number]: string;
|
|
[x: number]: string;
|
|
}
|
|
|
|
var b: {
|
|
[x: number]: string;
|
|
[x: number]: string
|
|
} = { 1: '', "2": '' }
|
|
|
|
class C2<T> {
|
|
[x: number]: string;
|
|
[x: number]: string;
|
|
}
|
|
|
|
interface I<T> {
|
|
[x: number]: string;
|
|
[x: number]: string;
|
|
}
|