2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/classIndexer2.ts(4,5): error TS2411: Property 'y' of type 'string' is not assignable to string index type 'number'.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/classIndexer2.ts (1 errors) ====
|
|
|
|
class C123 {
|
|
|
|
[s: string]: number;
|
|
|
|
x: number;
|
|
|
|
y: string;
|
|
|
|
~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2411: Property 'y' of type 'string' is not assignable to string index type 'number'.
|
2014-07-13 01:04:16 +02:00
|
|
|
constructor() {
|
|
|
|
}
|
|
|
|
}
|