You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/baselines/reference/indexSignatures1.errors.txt
+7-1
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,10 @@ indexSignatures1.ts(73,5): error TS2374: Duplicate index signature for type '`fo
15
15
indexSignatures1.ts(81,5): error TS2413: '`a${string}a`' index type '"c"' is not assignable to '`${string}a`' index type '"b"'.
16
16
indexSignatures1.ts(81,5): error TS2413: '`a${string}a`' index type '"c"' is not assignable to '`a${string}`' index type '"a"'.
17
17
indexSignatures1.ts(87,6): error TS1337: An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead.
18
+
indexSignatures1.ts(88,5): error TS2374: Duplicate index signature for type 'T'.
18
19
indexSignatures1.ts(88,6): error TS1337: An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead.
19
20
indexSignatures1.ts(89,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type.
21
+
indexSignatures1.ts(90,5): error TS2374: Duplicate index signature for type 'T'.
20
22
indexSignatures1.ts(90,6): error TS1337: An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead.
21
23
indexSignatures1.ts(117,1): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'I1'.
22
24
No index signature with a parameter of type 'string' was found on type 'I1'.
@@ -69,7 +71,7 @@ indexSignatures1.ts(289,7): error TS2322: Type 'number' is not assignable to typ
69
71
indexSignatures1.ts(312,43): error TS2353: Object literal may only specify known properties, and '[sym]' does not exist in type '{ [key: number]: string; }'.
70
72
71
73
72
-
==== indexSignatures1.ts (50 errors) ====
74
+
==== indexSignatures1.ts (52 errors) ====
73
75
// Symbol index signature checking
74
76
75
77
const sym = Symbol();
@@ -188,12 +190,16 @@ indexSignatures1.ts(312,43): error TS2353: Object literal may only specify known
188
190
~~~
189
191
!!! error TS1337: An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead.
190
192
[key: T | number]: string; // Error
193
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
194
+
!!! error TS2374: Duplicate index signature for type 'T'.
191
195
~~~
192
196
!!! error TS1337: An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead.
193
197
[key: Error]: string; // Error
194
198
~~~
195
199
!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type.
196
200
[key: T & string]: string; // Error
201
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
202
+
!!! error TS2374: Duplicate index signature for type 'T'.
197
203
~~~
198
204
!!! error TS1337: An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead.
0 commit comments