TypeScript/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt

28 lines
1.1 KiB
Text
Raw Normal View History

tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(2,6): error TS1022: An index signature parameter must have a type annotation.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(7,6): error TS1022: An index signature parameter must have a type annotation.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(12,5): error TS1021: An index signature must have a type annotation.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts (4 errors) ====
interface I {
[x]: string;
~
!!! error TS1022: An index signature parameter must have a type annotation.
2014-07-13 01:04:16 +02:00
[x: string];
~~~~~~~~~~~
!!! error TS1021: An index signature must have a type annotation.
2014-07-13 01:04:16 +02:00
}
class C {
[x]: string
~
!!! error TS1022: An index signature parameter must have a type annotation.
2014-07-13 01:04:16 +02:00
}
class C2 {
[x: string]
~~~~~~~~~~~
!!! error TS1021: An index signature must have a type annotation.
2014-07-13 01:04:16 +02:00
}