Skip to content

Commit 3fb3649

Browse files
committed
Accept new baselines
1 parent 014aeb3 commit 3fb3649

File tree

1 file changed

+44
-20
lines changed

1 file changed

+44
-20
lines changed

tests/baselines/reference/mappedTypeRelationships.errors.txt

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(12,5): error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
2-
Type 'T' is not assignable to type 'U'.
2+
Type 'T[string]' is not assignable to type 'U[keyof T]'.
3+
Type 'T' is not assignable to type 'U'.
34
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(17,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
4-
Type 'T' is not assignable to type 'U'.
5+
Type 'T[string]' is not assignable to type 'U[K]'.
6+
Type 'T' is not assignable to type 'U'.
57
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(21,5): error TS2536: Type 'keyof U' cannot be used to index type 'T'.
68
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(22,5): error TS2322: Type 'T[keyof U]' is not assignable to type 'U[keyof U]'.
7-
Type 'T' is not assignable to type 'U'.
9+
Type 'T[string]' is not assignable to type 'U[keyof U]'.
10+
Type 'T' is not assignable to type 'U'.
811
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(22,12): error TS2536: Type 'keyof U' cannot be used to index type 'T'.
912
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(26,5): error TS2536: Type 'K' cannot be used to index type 'T'.
1013
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(27,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
11-
Type 'T' is not assignable to type 'U'.
14+
Type 'T[string]' is not assignable to type 'U[K]'.
15+
Type 'T' is not assignable to type 'U'.
1216
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(27,12): error TS2536: Type 'K' cannot be used to index type 'T'.
1317
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(31,5): error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
1418
Type 'undefined' is not assignable to type 'T[keyof T]'.
@@ -17,13 +21,19 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(36,5): error TS2
1721
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(41,5): error TS2322: Type 'U[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
1822
Type 'undefined' is not assignable to type 'T[keyof T]'.
1923
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(42,5): error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'.
20-
Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
21-
Type 'T' is not assignable to type 'U'.
24+
Type 'T[string]' is not assignable to type 'U[keyof T] | undefined'.
25+
Type 'T[string]' is not assignable to type 'U[keyof T]'.
26+
Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
27+
Type 'T[string]' is not assignable to type 'U[keyof T]'.
28+
Type 'T' is not assignable to type 'U'.
2229
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(46,5): error TS2322: Type 'U[K] | undefined' is not assignable to type 'T[K]'.
2330
Type 'undefined' is not assignable to type 'T[K]'.
2431
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(47,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'.
25-
Type 'T[K]' is not assignable to type 'U[K]'.
26-
Type 'T' is not assignable to type 'U'.
32+
Type 'T[string]' is not assignable to type 'U[K] | undefined'.
33+
Type 'T[string]' is not assignable to type 'U[K]'.
34+
Type 'T[K]' is not assignable to type 'U[K]'.
35+
Type 'T[string]' is not assignable to type 'U[K]'.
36+
Type 'T' is not assignable to type 'U'.
2737
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(52,5): error TS2542: Index signature in type 'Readonly<T>' only permits reading.
2838
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(57,5): error TS2542: Index signature in type 'Readonly<T>' only permits reading.
2939
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(62,5): error TS2542: Index signature in type 'Readonly<U>' only permits reading.
@@ -33,7 +43,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(76,5): error TS2
3343
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(126,5): error TS2322: Type 'Partial<U>' is not assignable to type 'Identity<U>'.
3444
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(142,5): error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof T]: U[P]; }'.
3545
Type 'T[P]' is not assignable to type 'U[P]'.
36-
Type 'T' is not assignable to type 'U'.
46+
Type 'T[string]' is not assignable to type 'U[P]'.
47+
Type 'T' is not assignable to type 'U'.
3748
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(147,5): error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof U]: U[P]; }'.
3849
Type 'keyof U' is not assignable to type 'keyof T'.
3950
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(152,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof T]: T[P]; }'.
@@ -44,7 +55,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(162,5): error TS
4455
Type 'keyof T' is not assignable to type 'K'.
4556
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in K]: U[P]; }'.
4657
Type 'T[P]' is not assignable to type 'U[P]'.
47-
Type 'T' is not assignable to type 'U'.
58+
Type 'T[string]' is not assignable to type 'U[P]'.
59+
Type 'T' is not assignable to type 'U'.
4860

4961

5062
==== tests/cases/conformance/types/mapped/mappedTypeRelationships.ts (27 errors) ====
@@ -62,15 +74,17 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
6274
y[k] = x[k]; // Error
6375
~~~~
6476
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
65-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
77+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'.
78+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
6679
}
6780

6881
function f4<T, U extends T, K extends keyof T>(x: T, y: U, k: K) {
6982
x[k] = y[k];
7083
y[k] = x[k]; // Error
7184
~~~~
7285
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
73-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
86+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'.
87+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
7488
}
7589

7690
function f5<T, U extends T>(x: T, y: U, k: keyof U) {
@@ -80,7 +94,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
8094
y[k] = x[k]; // Error
8195
~~~~
8296
!!! error TS2322: Type 'T[keyof U]' is not assignable to type 'U[keyof U]'.
83-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
97+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof U]'.
98+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
8499
~~~~
85100
!!! error TS2536: Type 'keyof U' cannot be used to index type 'T'.
86101
}
@@ -92,7 +107,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
92107
y[k] = x[k]; // Error
93108
~~~~
94109
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
95-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
110+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'.
111+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
96112
~~~~
97113
!!! error TS2536: Type 'K' cannot be used to index type 'T'.
98114
}
@@ -121,8 +137,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
121137
y[k] = x[k]; // Error
122138
~~~~
123139
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'.
124-
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
125-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
140+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T] | undefined'.
141+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'.
142+
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
143+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'.
144+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
126145
}
127146

128147
function f13<T, U extends T, K extends keyof T>(x: T, y: Partial<U>, k: K) {
@@ -133,8 +152,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
133152
y[k] = x[k]; // Error
134153
~~~~
135154
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'.
136-
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
137-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
155+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K] | undefined'.
156+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'.
157+
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
158+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'.
159+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
138160
}
139161

140162
function f20<T>(x: T, y: Readonly<T>, k: keyof T) {
@@ -247,7 +269,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
247269
~
248270
!!! error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof T]: U[P]; }'.
249271
!!! error TS2322: Type 'T[P]' is not assignable to type 'U[P]'.
250-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
272+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[P]'.
273+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
251274
}
252275

253276
function f72<T, U extends T>(x: { [P in keyof T]: T[P] }, y: { [P in keyof U]: U[P] }) {
@@ -288,6 +311,7 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
288311
~
289312
!!! error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in K]: U[P]; }'.
290313
!!! error TS2322: Type 'T[P]' is not assignable to type 'U[P]'.
291-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
314+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[P]'.
315+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
292316
}
293317

0 commit comments

Comments
 (0)