Skip to content

Commit 1312e8a

Browse files
committed
Accept new baselines
1 parent f269f42 commit 1312e8a

File tree

3 files changed

+46
-26
lines changed

3 files changed

+46
-26
lines changed

tests/baselines/reference/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.errors.txt

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@ tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.t
22
Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, TextChannel> | ChannelOfType<T, EmailChannel>, "type">'.
33
Types of property 'type' are incompatible.
44
Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
5-
Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
6-
Type '"text" | "email"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
5+
Type '"text" | "email"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
6+
Type '"text"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
77
Type '"text"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
8-
Type '"text"' is not assignable to type 'T & "text"'.
9-
Type '"text"' is not assignable to type 'T'.
10-
'"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'.
11-
Type 'T' is not assignable to type 'T & "text"'.
12-
Type 'T' is not assignable to type '"text"'.
13-
Type '"text" | "email"' is not assignable to type '"text"'.
14-
Type '"email"' is not assignable to type '"text"'.
8+
Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
9+
Type '"text" | "email"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
10+
Type '"text"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
11+
Type '"text"' is not assignable to type 'T & "text"'.
12+
Type 'T' is not assignable to type 'T & "text"'.
13+
Type '"text" | "email"' is not assignable to type 'T & "text"'.
14+
Type '"text"' is not assignable to type 'T & "text"'.
15+
Type '"text"' is not assignable to type 'T'.
16+
'"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'.
17+
Type 'T' is not assignable to type '"text"'.
18+
Type '"text" | "email"' is not assignable to type '"text"'.
19+
Type '"email"' is not assignable to type '"text"'.
1520

1621

1722
==== tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts (1 errors) ====
@@ -53,16 +58,21 @@ tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.t
5358
!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, TextChannel> | ChannelOfType<T, EmailChannel>, "type">'.
5459
!!! error TS2322: Types of property 'type' are incompatible.
5560
!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
56-
!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
57-
!!! error TS2322: Type '"text" | "email"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
61+
!!! error TS2322: Type '"text" | "email"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
62+
!!! error TS2322: Type '"text"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
5863
!!! error TS2322: Type '"text"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
59-
!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'.
60-
!!! error TS2322: Type '"text"' is not assignable to type 'T'.
61-
!!! error TS2322: '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'.
62-
!!! error TS2322: Type 'T' is not assignable to type 'T & "text"'.
63-
!!! error TS2322: Type 'T' is not assignable to type '"text"'.
64-
!!! error TS2322: Type '"text" | "email"' is not assignable to type '"text"'.
65-
!!! error TS2322: Type '"email"' is not assignable to type '"text"'.
64+
!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
65+
!!! error TS2322: Type '"text" | "email"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
66+
!!! error TS2322: Type '"text"' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
67+
!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'.
68+
!!! error TS2322: Type 'T' is not assignable to type 'T & "text"'.
69+
!!! error TS2322: Type '"text" | "email"' is not assignable to type 'T & "text"'.
70+
!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'.
71+
!!! error TS2322: Type '"text"' is not assignable to type 'T'.
72+
!!! error TS2322: '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'.
73+
!!! error TS2322: Type 'T' is not assignable to type '"text"'.
74+
!!! error TS2322: Type '"text" | "email"' is not assignable to type '"text"'.
75+
!!! error TS2322: Type '"email"' is not assignable to type '"text"'.
6676
}
6777

6878
const newTextChannel = makeNewChannel('text');

tests/baselines/reference/indexedAccessRelation.errors.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
tests/cases/compiler/indexedAccessRelation.ts(16,23): error TS2345: Argument of type '{ a: T; }' is not assignable to parameter of type 'Pick<S & State<T>, "a">'.
22
Types of property 'a' are incompatible.
33
Type 'T' is not assignable to type 'S["a"] & T'.
4-
Type 'T' is not assignable to type 'S["a"]'.
4+
Type 'Foo' is not assignable to type 'S["a"] & T'.
55
Type 'Foo' is not assignable to type 'S["a"]'.
6+
Type 'T' is not assignable to type 'S["a"]'.
7+
Type 'Foo' is not assignable to type 'S["a"]'.
68

79

810
==== tests/cases/compiler/indexedAccessRelation.ts (1 errors) ====
@@ -26,8 +28,10 @@ tests/cases/compiler/indexedAccessRelation.ts(16,23): error TS2345: Argument of
2628
!!! error TS2345: Argument of type '{ a: T; }' is not assignable to parameter of type 'Pick<S & State<T>, "a">'.
2729
!!! error TS2345: Types of property 'a' are incompatible.
2830
!!! error TS2345: Type 'T' is not assignable to type 'S["a"] & T'.
29-
!!! error TS2345: Type 'T' is not assignable to type 'S["a"]'.
31+
!!! error TS2345: Type 'Foo' is not assignable to type 'S["a"] & T'.
3032
!!! error TS2345: Type 'Foo' is not assignable to type 'S["a"]'.
33+
!!! error TS2345: Type 'T' is not assignable to type 'S["a"]'.
34+
!!! error TS2345: Type 'Foo' is not assignable to type 'S["a"]'.
3135
}
3236
}
3337

tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,12 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(73,5): error
2626
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(74,5): error TS2536: Type 'keyof T | keyof U' cannot be used to index type 'T | U'.
2727
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(82,5): error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
2828
Type 'keyof T' is not assignable to type 'keyof T & keyof U'.
29-
Type 'keyof T' is not assignable to type 'keyof U'.
30-
Type 'string | number | symbol' is not assignable to type 'keyof U'.
31-
Type 'string' is not assignable to type 'keyof U'.
29+
Type 'string | number | symbol' is not assignable to type 'keyof T & keyof U'.
30+
Type 'string' is not assignable to type 'keyof T & keyof U'.
31+
Type 'string' is not assignable to type 'keyof T'.
32+
Type 'keyof T' is not assignable to type 'keyof U'.
33+
Type 'string | number | symbol' is not assignable to type 'keyof U'.
34+
Type 'string' is not assignable to type 'keyof U'.
3235
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(83,5): error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
3336
Type 'keyof T' is not assignable to type 'keyof T & keyof U'.
3437
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(86,5): error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
@@ -200,9 +203,12 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(142,5): error
200203
~~
201204
!!! error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
202205
!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof T & keyof U'.
203-
!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof U'.
204-
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof U'.
205-
!!! error TS2322: Type 'string' is not assignable to type 'keyof U'.
206+
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof T & keyof U'.
207+
!!! error TS2322: Type 'string' is not assignable to type 'keyof T & keyof U'.
208+
!!! error TS2322: Type 'string' is not assignable to type 'keyof T'.
209+
!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof U'.
210+
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof U'.
211+
!!! error TS2322: Type 'string' is not assignable to type 'keyof U'.
206212
k1 = k4; // Error
207213
~~
208214
!!! error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.

0 commit comments

Comments
 (0)