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

28 lines
1.2 KiB
Text
Raw Normal View History

2014-11-27 05:10:49 +01:00
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(2,5): error TS1169: Computed property names are not allowed in interfaces.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1021: An index signature must have a type annotation.
2014-11-18 23:34:04 +01:00
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(7,5): error TS1166: 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.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts (4 errors) ====
interface I {
[x]: string;
~~~
2014-11-27 05:10:49 +01:00
!!! error TS1169: Computed property names are not allowed in interfaces.
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
~~~
2014-11-18 23:34:04 +01:00
!!! error TS1166: Computed property names are not allowed in class property declarations.
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
}