Skip to content

Commit 4aeab77

Browse files
committed
Accept new baselines
1 parent cca7ac2 commit 4aeab77

File tree

1 file changed

+104
-24
lines changed

1 file changed

+104
-24
lines changed

tests/baselines/reference/mappedTypeRelationships.errors.txt

Lines changed: 104 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,71 @@
11
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(12,5): error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
22
Type 'T[string]' is not assignable to type 'U[keyof T]'.
3-
Type 'T' is not assignable to type 'U'.
3+
Type 'T[string]' is not assignable to type 'U[string]'.
4+
Type 'T' is not assignable to type 'U'.
5+
Type 'T[keyof T]' is not assignable to type 'U[string]'.
6+
Type 'T[string]' is not assignable to type 'U[string]'.
7+
Type 'T' is not assignable to type 'U'.
48
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(17,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
59
Type 'T[string]' is not assignable to type 'U[K]'.
6-
Type 'T' is not assignable to type 'U'.
10+
Type 'T[string]' is not assignable to type 'U[string]'.
11+
Type 'T' is not assignable to type 'U'.
12+
Type 'T[K]' is not assignable to type 'U[string]'.
13+
Type 'T[string]' is not assignable to type 'U[string]'.
14+
Type 'T' is not assignable to type 'U'.
715
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(21,5): error TS2536: Type 'keyof U' cannot be used to index type 'T'.
816
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(22,5): error TS2322: Type 'T[keyof U]' is not assignable to type 'U[keyof U]'.
917
Type 'T[string]' is not assignable to type 'U[keyof U]'.
10-
Type 'T' is not assignable to type 'U'.
18+
Type 'T[string]' is not assignable to type 'U[string]'.
19+
Type 'T' is not assignable to type 'U'.
20+
Type 'T[keyof U]' is not assignable to type 'U[string]'.
21+
Type 'T[string]' is not assignable to type 'U[string]'.
22+
Type 'T' is not assignable to type 'U'.
1123
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(22,12): error TS2536: Type 'keyof U' cannot be used to index type 'T'.
1224
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(26,5): error TS2536: Type 'K' cannot be used to index type 'T'.
1325
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(27,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
1426
Type 'T[string]' is not assignable to type 'U[K]'.
15-
Type 'T' is not assignable to type 'U'.
27+
Type 'T[string]' is not assignable to type 'U[string]'.
28+
Type 'T' is not assignable to type 'U'.
29+
Type 'T[K]' is not assignable to type 'U[string]'.
30+
Type 'T[string]' is not assignable to type 'U[string]'.
31+
Type 'T' is not assignable to type 'U'.
1632
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(27,12): error TS2536: Type 'K' cannot be used to index type 'T'.
1733
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(31,5): error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
1834
Type 'undefined' is not assignable to type 'T[keyof T]'.
35+
Type 'undefined' is not assignable to type 'T[string]'.
1936
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(36,5): error TS2322: Type 'T[K] | undefined' is not assignable to type 'T[K]'.
2037
Type 'undefined' is not assignable to type 'T[K]'.
38+
Type 'undefined' is not assignable to type 'T[string]'.
2139
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(41,5): error TS2322: Type 'U[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
2240
Type 'undefined' is not assignable to type 'T[keyof T]'.
41+
Type 'undefined' is not assignable to type 'T[string]'.
2342
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(42,5): error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'.
2443
Type 'T[string]' is not assignable to type 'U[keyof T] | undefined'.
2544
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'.
45+
Type 'T[string]' is not assignable to type 'U[string]'.
46+
Type 'T' is not assignable to type 'U'.
47+
Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
48+
Type 'T[string]' is not assignable to type 'U[keyof T]'.
49+
Type 'T[string]' is not assignable to type 'U[string]'.
50+
Type 'T' is not assignable to type 'U'.
51+
Type 'T[keyof T]' is not assignable to type 'U[string]'.
52+
Type 'T[string]' is not assignable to type 'U[string]'.
53+
Type 'T' is not assignable to type 'U'.
2954
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(46,5): error TS2322: Type 'U[K] | undefined' is not assignable to type 'T[K]'.
3055
Type 'undefined' is not assignable to type 'T[K]'.
56+
Type 'undefined' is not assignable to type 'T[string]'.
3157
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(47,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'.
3258
Type 'T[string]' is not assignable to type 'U[K] | undefined'.
3359
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'.
60+
Type 'T[string]' is not assignable to type 'U[string]'.
61+
Type 'T' is not assignable to type 'U'.
62+
Type 'T[K]' is not assignable to type 'U[K]'.
63+
Type 'T[string]' is not assignable to type 'U[K]'.
64+
Type 'T[string]' is not assignable to type 'U[string]'.
65+
Type 'T' is not assignable to type 'U'.
66+
Type 'T[K]' is not assignable to type 'U[string]'.
67+
Type 'T[string]' is not assignable to type 'U[string]'.
68+
Type 'T' is not assignable to type 'U'.
3769
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(52,5): error TS2542: Index signature in type 'Readonly<T>' only permits reading.
3870
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(57,5): error TS2542: Index signature in type 'Readonly<T>' only permits reading.
3971
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(62,5): error TS2542: Index signature in type 'Readonly<U>' only permits reading.
@@ -44,7 +76,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(126,5): error TS
4476
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]; }'.
4577
Type 'T[P]' is not assignable to type 'U[P]'.
4678
Type 'T[string]' is not assignable to type 'U[P]'.
47-
Type 'T' is not assignable to type 'U'.
79+
Type 'T[string]' is not assignable to type 'U[string]'.
80+
Type 'T' is not assignable to type 'U'.
81+
Type 'T[P]' is not assignable to type 'U[string]'.
82+
Type 'T[string]' is not assignable to type 'U[string]'.
83+
Type 'T' is not assignable to type 'U'.
4884
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]; }'.
4985
Type 'keyof U' is not assignable to type 'keyof T'.
5086
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]; }'.
@@ -56,7 +92,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(162,5): error TS
5692
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]; }'.
5793
Type 'T[P]' is not assignable to type 'U[P]'.
5894
Type 'T[string]' is not assignable to type 'U[P]'.
59-
Type 'T' is not assignable to type 'U'.
95+
Type 'T[string]' is not assignable to type 'U[string]'.
96+
Type 'T' is not assignable to type 'U'.
97+
Type 'T[P]' is not assignable to type 'U[string]'.
98+
Type 'T[string]' is not assignable to type 'U[string]'.
99+
Type 'T' is not assignable to type 'U'.
60100

61101

62102
==== tests/cases/conformance/types/mapped/mappedTypeRelationships.ts (27 errors) ====
@@ -75,7 +115,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
75115
~~~~
76116
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
77117
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'.
78-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
118+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
119+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
120+
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[string]'.
121+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
122+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
79123
}
80124

81125
function f4<T, U extends T, K extends keyof T>(x: T, y: U, k: K) {
@@ -84,7 +128,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
84128
~~~~
85129
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
86130
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'.
87-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
131+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
132+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
133+
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[string]'.
134+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
135+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
88136
}
89137

90138
function f5<T, U extends T>(x: T, y: U, k: keyof U) {
@@ -95,7 +143,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
95143
~~~~
96144
!!! error TS2322: Type 'T[keyof U]' is not assignable to type 'U[keyof U]'.
97145
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof U]'.
98-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
146+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
147+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
148+
!!! error TS2322: Type 'T[keyof U]' is not assignable to type 'U[string]'.
149+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
150+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
99151
~~~~
100152
!!! error TS2536: Type 'keyof U' cannot be used to index type 'T'.
101153
}
@@ -108,7 +160,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
108160
~~~~
109161
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
110162
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'.
111-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
163+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
164+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
165+
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[string]'.
166+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
167+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
112168
~~~~
113169
!!! error TS2536: Type 'K' cannot be used to index type 'T'.
114170
}
@@ -118,6 +174,7 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
118174
~~~~
119175
!!! error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
120176
!!! error TS2322: Type 'undefined' is not assignable to type 'T[keyof T]'.
177+
!!! error TS2322: Type 'undefined' is not assignable to type 'T[string]'.
121178
y[k] = x[k];
122179
}
123180

@@ -126,6 +183,7 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
126183
~~~~
127184
!!! error TS2322: Type 'T[K] | undefined' is not assignable to type 'T[K]'.
128185
!!! error TS2322: Type 'undefined' is not assignable to type 'T[K]'.
186+
!!! error TS2322: Type 'undefined' is not assignable to type 'T[string]'.
129187
y[k] = x[k];
130188
}
131189

@@ -134,29 +192,43 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
134192
~~~~
135193
!!! error TS2322: Type 'U[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
136194
!!! error TS2322: Type 'undefined' is not assignable to type 'T[keyof T]'.
195+
!!! error TS2322: Type 'undefined' is not assignable to type 'T[string]'.
137196
y[k] = x[k]; // Error
138197
~~~~
139198
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'.
140199
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T] | undefined'.
141200
!!! 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'.
201+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
202+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
203+
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
204+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'.
205+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
206+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
207+
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[string]'.
208+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
209+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
145210
}
146211

147212
function f13<T, U extends T, K extends keyof T>(x: T, y: Partial<U>, k: K) {
148213
x[k] = y[k]; // Error
149214
~~~~
150215
!!! error TS2322: Type 'U[K] | undefined' is not assignable to type 'T[K]'.
151216
!!! error TS2322: Type 'undefined' is not assignable to type 'T[K]'.
217+
!!! error TS2322: Type 'undefined' is not assignable to type 'T[string]'.
152218
y[k] = x[k]; // Error
153219
~~~~
154220
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'.
155221
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K] | undefined'.
156222
!!! 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'.
223+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
224+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
225+
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
226+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'.
227+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
228+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
229+
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[string]'.
230+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
231+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
160232
}
161233

162234
function f20<T>(x: T, y: Readonly<T>, k: keyof T) {
@@ -270,7 +342,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
270342
!!! error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof T]: U[P]; }'.
271343
!!! error TS2322: Type 'T[P]' is not assignable to type 'U[P]'.
272344
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[P]'.
273-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
345+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
346+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
347+
!!! error TS2322: Type 'T[P]' is not assignable to type 'U[string]'.
348+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
349+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
274350
}
275351

276352
function f72<T, U extends T>(x: { [P in keyof T]: T[P] }, y: { [P in keyof U]: U[P] }) {
@@ -312,6 +388,10 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
312388
!!! error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in K]: U[P]; }'.
313389
!!! error TS2322: Type 'T[P]' is not assignable to type 'U[P]'.
314390
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[P]'.
315-
!!! error TS2322: Type 'T' is not assignable to type 'U'.
391+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
392+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
393+
!!! error TS2322: Type 'T[P]' is not assignable to type 'U[string]'.
394+
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
395+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
316396
}
317397

0 commit comments

Comments
 (0)