20 lines
1.2 KiB
Plaintext
20 lines
1.2 KiB
Plaintext
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(2,9): error TS1169: Computed property names are not allowed in interfaces.
|
|
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: Computed property names are not allowed in interfaces.
|
|
~
|
|
!!! 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.
|
|
} |