TypeScript/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt
2014-11-25 16:08:53 -08:00

28 lines
No EOL
1.2 KiB
Text

tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(2,5): error TS1161: Computed property names are not allowed in interfaces or type literals.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(7,5): error TS1164: Computed property names are not allowed in class property declarations.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(12,5): error TS1021: An index signature must have a type annotation.
==== tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts (4 errors) ====
interface I {
[x]: string;
~~~
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
[x: string];
~~~~~~~~~~~~
!!! error TS1021: An index signature must have a type annotation.
}
class C {
[x]: string
~~~
!!! error TS1164: Computed property names are not allowed in class property declarations.
}
class C2 {
[x: string]
~~~~~~~~~~~
!!! error TS1021: An index signature must have a type annotation.
}