Skip to content

Commit a35c496

Browse files
committed
Accept new baselines
1 parent a2928b8 commit a35c496

File tree

5 files changed

+30
-60
lines changed

5 files changed

+30
-60
lines changed

tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(13,1): error TS2322: Type 'A[]' is not assignable to type 'ReadonlyArray<B>'.
2-
Types of property 'concat' are incompatible.
3-
Type '{ (...items: ConcatArray<A>[]): A[]; (...items: (A | ConcatArray<A>)[]): A[]; }' is not assignable to type '{ (...items: ConcatArray<B>[]): B[]; (...items: (B | ConcatArray<B>)[]): B[]; }'.
4-
Type 'A[]' is not assignable to type 'B[]'.
5-
Type 'A' is not assignable to type 'B'.
6-
Property 'b' is missing in type 'A'.
2+
Type 'A' is not assignable to type 'B'.
3+
Property 'b' is missing in type 'A'.
74
tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error TS2322: Type 'C<A>' is not assignable to type 'ReadonlyArray<B>'.
85
Types of property 'concat' are incompatible.
96
Type '{ (...items: ConcatArray<A>[]): A[]; (...items: (A | ConcatArray<A>)[]): A[]; }' is not assignable to type '{ (...items: ConcatArray<B>[]): B[]; (...items: (B | ConcatArray<B>)[]): B[]; }'.
107
Type 'A[]' is not assignable to type 'B[]'.
8+
Type 'A' is not assignable to type 'B'.
119

1210

1311
==== tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts (2 errors) ====
@@ -26,11 +24,8 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T
2624
rrb = ara; // error: 'A' is not assignable to 'B'
2725
~~~
2826
!!! error TS2322: Type 'A[]' is not assignable to type 'ReadonlyArray<B>'.
29-
!!! error TS2322: Types of property 'concat' are incompatible.
30-
!!! error TS2322: Type '{ (...items: ConcatArray<A>[]): A[]; (...items: (A | ConcatArray<A>)[]): A[]; }' is not assignable to type '{ (...items: ConcatArray<B>[]): B[]; (...items: (B | ConcatArray<B>)[]): B[]; }'.
31-
!!! error TS2322: Type 'A[]' is not assignable to type 'B[]'.
32-
!!! error TS2322: Type 'A' is not assignable to type 'B'.
33-
!!! error TS2322: Property 'b' is missing in type 'A'.
27+
!!! error TS2322: Type 'A' is not assignable to type 'B'.
28+
!!! error TS2322: Property 'b' is missing in type 'A'.
3429

3530
rra = cra;
3631
rra = crb; // OK, C<B> is assignable to ReadonlyArray<A>
@@ -41,4 +36,5 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T
4136
!!! error TS2322: Types of property 'concat' are incompatible.
4237
!!! error TS2322: Type '{ (...items: ConcatArray<A>[]): A[]; (...items: (A | ConcatArray<A>)[]): A[]; }' is not assignable to type '{ (...items: ConcatArray<B>[]): B[]; (...items: (B | ConcatArray<B>)[]): B[]; }'.
4338
!!! error TS2322: Type 'A[]' is not assignable to type 'B[]'.
39+
!!! error TS2322: Type 'A' is not assignable to type 'B'.
4440

tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(17,1): error TS2322: Type '[number, string]' is not assignable to type 'number[]'.
2-
Types of property 'pop' are incompatible.
3-
Type '() => string | number' is not assignable to type '() => number'.
4-
Type 'string | number' is not assignable to type 'number'.
5-
Type 'string' is not assignable to type 'number'.
2+
Type 'string | number' is not assignable to type 'number'.
3+
Type 'string' is not assignable to type 'number'.
64
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2322: Type '{}[]' is not assignable to type '[{}]'.
75
Property '0' is missing in type '{}[]'.
86

@@ -27,10 +25,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
2725
numArray = numStrTuple;
2826
~~~~~~~~
2927
!!! error TS2322: Type '[number, string]' is not assignable to type 'number[]'.
30-
!!! error TS2322: Types of property 'pop' are incompatible.
31-
!!! error TS2322: Type '() => string | number' is not assignable to type '() => number'.
32-
!!! error TS2322: Type 'string | number' is not assignable to type 'number'.
33-
!!! error TS2322: Type 'string' is not assignable to type 'number'.
28+
!!! error TS2322: Type 'string | number' is not assignable to type 'number'.
29+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
3430
emptyObjTuple = emptyObjArray;
3531
~~~~~~~~~~~~~
3632
!!! error TS2322: Type '{}[]' is not assignable to type '[{}]'.

tests/baselines/reference/for-of39.errors.txt

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
tests/cases/conformance/es6/for-ofStatements/for-of39.ts(1,19): error TS2345: Argument of type '([string, number] | [string, true])[]' is not assignable to parameter of type 'ReadonlyArray<[string, boolean]>'.
2-
Types of property 'concat' are incompatible.
3-
Type '{ (...items: ConcatArray<[string, number] | [string, true]>[]): ([string, number] | [string, true])[]; (...items: ([string, number] | [string, true] | ConcatArray<[string, number] | [string, true]>)[]): ([string, number] | [string, true])[]; }' is not assignable to type '{ (...items: ConcatArray<[string, boolean]>[]): [string, boolean][]; (...items: ([string, boolean] | ConcatArray<[string, boolean]>)[]): [string, boolean][]; }'.
4-
Types of parameters 'items' and 'items' are incompatible.
5-
Type 'ConcatArray<[string, boolean]>' is not assignable to type 'ConcatArray<[string, number] | [string, true]>'.
6-
Type '[string, boolean]' is not assignable to type '[string, number] | [string, true]'.
7-
Type '[string, boolean]' is not assignable to type '[string, number]'.
8-
Type 'boolean' is not assignable to type 'number'.
2+
Type '[string, number] | [string, true]' is not assignable to type '[string, boolean]'.
3+
Type '[string, number]' is not assignable to type '[string, boolean]'.
4+
Type 'number' is not assignable to type 'boolean'.
95

106

117
==== tests/cases/conformance/es6/for-ofStatements/for-of39.ts (1 errors) ====
128
var map = new Map([["", true], ["", 0]]);
139
~~~~~~~~~~~~~~~~~~~~~
1410
!!! error TS2345: Argument of type '([string, number] | [string, true])[]' is not assignable to parameter of type 'ReadonlyArray<[string, boolean]>'.
15-
!!! error TS2345: Types of property 'concat' are incompatible.
16-
!!! error TS2345: Type '{ (...items: ConcatArray<[string, number] | [string, true]>[]): ([string, number] | [string, true])[]; (...items: ([string, number] | [string, true] | ConcatArray<[string, number] | [string, true]>)[]): ([string, number] | [string, true])[]; }' is not assignable to type '{ (...items: ConcatArray<[string, boolean]>[]): [string, boolean][]; (...items: ([string, boolean] | ConcatArray<[string, boolean]>)[]): [string, boolean][]; }'.
17-
!!! error TS2345: Types of parameters 'items' and 'items' are incompatible.
18-
!!! error TS2345: Type 'ConcatArray<[string, boolean]>' is not assignable to type 'ConcatArray<[string, number] | [string, true]>'.
19-
!!! error TS2345: Type '[string, boolean]' is not assignable to type '[string, number] | [string, true]'.
20-
!!! error TS2345: Type '[string, boolean]' is not assignable to type '[string, number]'.
21-
!!! error TS2345: Type 'boolean' is not assignable to type 'number'.
11+
!!! error TS2345: Type '[string, number] | [string, true]' is not assignable to type '[string, boolean]'.
12+
!!! error TS2345: Type '[string, number]' is not assignable to type '[string, boolean]'.
13+
!!! error TS2345: Type 'number' is not assignable to type 'boolean'.
2214
for (var [k, v] of map) {
2315
k;
2416
v;
Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts(1,33): error TS2501: A rest element cannot contain a binding pattern.
22
tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts(2,32): error TS2345: Argument of type '([string, number] | [string, boolean])[]' is not assignable to parameter of type 'ReadonlyArray<[string, number]>'.
3-
Types of property 'concat' are incompatible.
4-
Type '{ (...items: ConcatArray<[string, number] | [string, boolean]>[]): ([string, number] | [string, boolean])[]; (...items: ([string, number] | [string, boolean] | ConcatArray<[string, number] | [string, boolean]>)[]): ([string, number] | [string, boolean])[]; }' is not assignable to type '{ (...items: ConcatArray<[string, number]>[]): [string, number][]; (...items: ([string, number] | ConcatArray<[string, number]>)[]): [string, number][]; }'.
5-
Type '([string, number] | [string, boolean])[]' is not assignable to type '[string, number][]'.
6-
Type '[string, number] | [string, boolean]' is not assignable to type '[string, number]'.
7-
Type '[string, boolean]' is not assignable to type '[string, number]'.
8-
Type 'boolean' is not assignable to type 'number'.
3+
Type '[string, number] | [string, boolean]' is not assignable to type '[string, number]'.
4+
Type '[string, boolean]' is not assignable to type '[string, number]'.
5+
Type 'boolean' is not assignable to type 'number'.
96

107

118
==== tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts (2 errors) ====
@@ -15,9 +12,6 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts(2,32): error
1512
takeFirstTwoEntries(...new Map([["", 0], ["hello", true]]));
1613
~~~~~~~~~~~~~~~~~~~~~~~~~~
1714
!!! error TS2345: Argument of type '([string, number] | [string, boolean])[]' is not assignable to parameter of type 'ReadonlyArray<[string, number]>'.
18-
!!! error TS2345: Types of property 'concat' are incompatible.
19-
!!! error TS2345: Type '{ (...items: ConcatArray<[string, number] | [string, boolean]>[]): ([string, number] | [string, boolean])[]; (...items: ([string, number] | [string, boolean] | ConcatArray<[string, number] | [string, boolean]>)[]): ([string, number] | [string, boolean])[]; }' is not assignable to type '{ (...items: ConcatArray<[string, number]>[]): [string, number][]; (...items: ([string, number] | ConcatArray<[string, number]>)[]): [string, number][]; }'.
20-
!!! error TS2345: Type '([string, number] | [string, boolean])[]' is not assignable to type '[string, number][]'.
21-
!!! error TS2345: Type '[string, number] | [string, boolean]' is not assignable to type '[string, number]'.
22-
!!! error TS2345: Type '[string, boolean]' is not assignable to type '[string, number]'.
23-
!!! error TS2345: Type 'boolean' is not assignable to type 'number'.
15+
!!! error TS2345: Type '[string, number] | [string, boolean]' is not assignable to type '[string, number]'.
16+
!!! error TS2345: Type '[string, boolean]' is not assignable to type '[string, number]'.
17+
!!! error TS2345: Type 'boolean' is not assignable to type 'number'.

tests/baselines/reference/tupleTypes.errors.txt

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,11 @@ tests/cases/compiler/tupleTypes.ts(18,1): error TS2322: Type '[number, string, n
99
Type '3' is not assignable to type '2'.
1010
tests/cases/compiler/tupleTypes.ts(41,1): error TS2322: Type '[]' is not assignable to type '[number, string]'.
1111
tests/cases/compiler/tupleTypes.ts(47,1): error TS2322: Type '[number, string]' is not assignable to type 'number[]'.
12-
Types of property 'pop' are incompatible.
13-
Type '() => string | number' is not assignable to type '() => number'.
14-
Type 'string | number' is not assignable to type 'number'.
15-
Type 'string' is not assignable to type 'number'.
12+
Type 'string | number' is not assignable to type 'number'.
13+
Type 'string' is not assignable to type 'number'.
1614
tests/cases/compiler/tupleTypes.ts(49,1): error TS2322: Type '[number, {}]' is not assignable to type 'number[]'.
17-
Types of property 'pop' are incompatible.
18-
Type '() => number | {}' is not assignable to type '() => number'.
19-
Type 'number | {}' is not assignable to type 'number'.
20-
Type '{}' is not assignable to type 'number'.
15+
Type 'number | {}' is not assignable to type 'number'.
16+
Type '{}' is not assignable to type 'number'.
2117
tests/cases/compiler/tupleTypes.ts(50,1): error TS2322: Type '[number, number]' is not assignable to type '[number, string]'.
2218
Type 'number' is not assignable to type 'string'.
2319
tests/cases/compiler/tupleTypes.ts(51,1): error TS2322: Type '[number, {}]' is not assignable to type '[number, string]'.
@@ -90,18 +86,14 @@ tests/cases/compiler/tupleTypes.ts(51,1): error TS2322: Type '[number, {}]' is n
9086
a = a1; // Error
9187
~
9288
!!! error TS2322: Type '[number, string]' is not assignable to type 'number[]'.
93-
!!! error TS2322: Types of property 'pop' are incompatible.
94-
!!! error TS2322: Type '() => string | number' is not assignable to type '() => number'.
95-
!!! error TS2322: Type 'string | number' is not assignable to type 'number'.
96-
!!! error TS2322: Type 'string' is not assignable to type 'number'.
89+
!!! error TS2322: Type 'string | number' is not assignable to type 'number'.
90+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
9791
a = a2;
9892
a = a3; // Error
9993
~
10094
!!! error TS2322: Type '[number, {}]' is not assignable to type 'number[]'.
101-
!!! error TS2322: Types of property 'pop' are incompatible.
102-
!!! error TS2322: Type '() => number | {}' is not assignable to type '() => number'.
103-
!!! error TS2322: Type 'number | {}' is not assignable to type 'number'.
104-
!!! error TS2322: Type '{}' is not assignable to type 'number'.
95+
!!! error TS2322: Type 'number | {}' is not assignable to type 'number'.
96+
!!! error TS2322: Type '{}' is not assignable to type 'number'.
10597
a1 = a2; // Error
10698
~~
10799
!!! error TS2322: Type '[number, number]' is not assignable to type '[number, string]'.

0 commit comments

Comments
 (0)