1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(2,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(2,10): error TS2304: Cannot find name 'p'.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(3,9): error TS1021: An index signature must have a type annotation.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(4,10): error TS1096: An index signature must have exactly one parameter.
==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts (4 errors) ====
interface I {
[p]; // Used to be indexer, now it is a computed property
~~~
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
~~~~~~~~~~~~~
!!! error TS1021: An index signature must have a type annotation.
[p2: string, p3: number];
~~
!!! error TS1096: An index signature must have exactly one parameter.
}
|