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/dependentDestructuredVariables.errors.txt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
dependentDestructuredVariables.ts(334,5): error TS7022: 'value1' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
2
2
dependentDestructuredVariables.ts(334,5): error TS7031: Binding element 'value1' implicitly has an 'any' type.
3
-
dependentDestructuredVariables.ts(431,15): error TS2322: Type 'number' is not assignable to type 'never'.
3
+
dependentDestructuredVariables.ts(431,15): error TS2322: Type '1' is not assignable to type 'never'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/keyofAndIndexedAccess2.errors.txt
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
keyofAndIndexedAccess2.ts(4,5): error TS2322: Type 'string' is not assignable to type 'number'.
2
2
keyofAndIndexedAccess2.ts(6,5): error TS2322: Type '2' is not assignable to type '0 | 1'.
3
3
keyofAndIndexedAccess2.ts(7,5): error TS2322: Type '"x"' is not assignable to type '0 | 1'.
4
-
keyofAndIndexedAccess2.ts(8,5): error TS2322: Type 'number' is not assignable to type 'never'.
5
-
keyofAndIndexedAccess2.ts(9,5): error TS2322: Type 'number' is not assignable to type 'never'.
6
-
keyofAndIndexedAccess2.ts(10,5): error TS2322: Type 'string' is not assignable to type 'never'.
4
+
keyofAndIndexedAccess2.ts(8,5): error TS2322: Type '1' is not assignable to type 'never'.
5
+
keyofAndIndexedAccess2.ts(9,5): error TS2322: Type '2' is not assignable to type 'never'.
6
+
keyofAndIndexedAccess2.ts(10,5): error TS2322: Type '"x"' is not assignable to type 'never'.
7
7
keyofAndIndexedAccess2.ts(14,5): error TS2739: Type '{ [key: string]: number; }' is missing the following properties from type '{ x: number; y: number; }': x, y
8
8
keyofAndIndexedAccess2.ts(15,5): error TS2322: Type 'T' is not assignable to type '{ x: number; y: number; }'.
9
9
Type '{ [key: string]: number; }' is missing the following properties from type '{ x: number; y: number; }': x, y
keyofAndIndexedAccess2.ts(38,5): error TS2322: Type '{ [x: string]: number; }' is not assignable to type '{ [P in K]: number; }'.
19
19
keyofAndIndexedAccess2.ts(50,3): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Item'.
20
20
No index signature with a parameter of type 'string' was found on type 'Item'.
21
-
keyofAndIndexedAccess2.ts(51,3): error TS2322: Type 'number' is not assignable to type 'never'.
21
+
keyofAndIndexedAccess2.ts(51,3): error TS2322: Type '123' is not assignable to type 'never'.
22
22
keyofAndIndexedAccess2.ts(52,3): error TS2322: Type 'number' is not assignable to type 'T[keyof T]'.
23
23
'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'number'.
24
24
keyofAndIndexedAccess2.ts(53,3): error TS2322: Type 'number' is not assignable to type 'T[K]'.
@@ -30,7 +30,7 @@ keyofAndIndexedAccess2.ts(67,3): error TS2322: Type 'number' is not assignable t
30
30
keyofAndIndexedAccess2.ts(68,3): error TS2322: Type 'number' is not assignable to type 'T[K]'.
31
31
'number' is assignable to the constraint of type 'T[K]', but 'T[K]' could be instantiated with a different subtype of constraint 'number'.
32
32
keyofAndIndexedAccess2.ts(108,5): error TS2322: Type '123' is not assignable to type 'Type[K]'.
33
-
Type 'number' is not assignable to type 'never'.
33
+
Type '123' is not assignable to type 'never'.
34
34
35
35
36
36
==== keyofAndIndexedAccess2.ts (23 errors) ====
@@ -49,13 +49,13 @@ keyofAndIndexedAccess2.ts(108,5): error TS2322: Type '123' is not assignable to
49
49
!!! error TS2322: Type '"x"' is not assignable to type '0 | 1'.
50
50
obj[k2] = 1; // Error
51
51
~~~~~~~
52
-
!!! error TS2322: Type 'number' is not assignable to type 'never'.
52
+
!!! error TS2322: Type '1' is not assignable to type 'never'.
53
53
obj[k2] = 2; // Error
54
54
~~~~~~~
55
-
!!! error TS2322: Type 'number' is not assignable to type 'never'.
55
+
!!! error TS2322: Type '2' is not assignable to type 'never'.
56
56
obj[k2] = 'x'; // Error
57
57
~~~~~~~
58
-
!!! error TS2322: Type 'string' is not assignable to type 'never'.
58
+
!!! error TS2322: Type '"x"' is not assignable to type 'never'.
59
59
}
60
60
61
61
function f2<T extends { [key: string]: number }>(a: { x: number, y: number }, b: { [key: string]: number }, c: T, k: keyof T) {
@@ -121,7 +121,7 @@ keyofAndIndexedAccess2.ts(108,5): error TS2322: Type '123' is not assignable to
121
121
!!! error TS7053: No index signature with a parameter of type 'string' was found on type 'Item'.
122
122
obj[k2] = 123; // Error
123
123
~~~~~~~
124
-
!!! error TS2322: Type 'number' is not assignable to type 'never'.
124
+
!!! error TS2322: Type '123' is not assignable to type 'never'.
125
125
obj[k3] = 123; // Error
126
126
~~~~~~~
127
127
!!! error TS2322: Type 'number' is not assignable to type 'T[keyof T]'.
@@ -197,7 +197,7 @@ keyofAndIndexedAccess2.ts(108,5): error TS2322: Type '123' is not assignable to
197
197
return 123; // Error
198
198
~~~~~~
199
199
!!! error TS2322: Type '123' is not assignable to type 'Type[K]'.
200
-
!!! error TS2322: Type 'number' is not assignable to type 'never'.
200
+
!!! error TS2322: Type '123' is not assignable to type 'never'.
0 commit comments