File: parserIndexSignature11.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (20 lines) | stat: -rw-r--r-- 1,345 bytes parent folder | download | duplicates (5)
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.
    }