mirror of
https://github.com/swc-project/swc.git
synced 2024-12-01 01:13:56 +03:00
31 lines
454 B
TypeScript
31 lines
454 B
TypeScript
// Multiple indexers of the same type are an error
|
|
|
|
class C {
|
|
[x: string]: string;
|
|
[x: string]: string;
|
|
}
|
|
|
|
interface I {
|
|
[x: string]: string;
|
|
[x: string]: string;
|
|
}
|
|
|
|
var a: {
|
|
[x: string]: string;
|
|
[x: string]: string;
|
|
}
|
|
|
|
var b: {
|
|
[x: string]: string;
|
|
[x: string]: string;
|
|
} = { y: '' }
|
|
|
|
class C2<T> {
|
|
[x: string]: string;
|
|
[x: string]: string;
|
|
}
|
|
|
|
interface I2<T> {
|
|
[x: string]: string;
|
|
[x: string]: string;
|
|
} |