Skip to content

Commit 840214f

Browse files
committed
Accept new baselines
1 parent 209f30c commit 840214f

13 files changed

+1314
-1316
lines changed

tests/baselines/reference/bestCommonTypeOfTuple.errors.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(22,13): error TS2733: Index '2' is out-of-bounds in tuple of length 2.
2-
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(23,13): error TS2733: Index '2' is out-of-bounds in tuple of length 2.
3-
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(24,13): error TS2733: Index '2' is out-of-bounds in tuple of length 2.
4-
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(25,13): error TS2733: Index '3' is out-of-bounds in tuple of length 3.
1+
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(22,13): error TS2339: Property '2' does not exist on type '[(x: number) => string, (x: number) => number]'.
2+
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(23,13): error TS2339: Property '2' does not exist on type '[E1, E2]'.
3+
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(24,13): error TS2339: Property '2' does not exist on type '[number, any]'.
4+
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(25,13): error TS2339: Property '3' does not exist on type '[E1, E2, number]'.
55

66

77
==== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts (4 errors) ====
@@ -28,13 +28,13 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfT
2828
t4 = [E1.one, E2.two, 20];
2929
var e1 = t1[2]; // {}
3030
~
31-
!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2.
31+
!!! error TS2339: Property '2' does not exist on type '[(x: number) => string, (x: number) => number]'.
3232
var e2 = t2[2]; // {}
3333
~
34-
!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2.
34+
!!! error TS2339: Property '2' does not exist on type '[E1, E2]'.
3535
var e3 = t3[2]; // any
3636
~
37-
!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2.
37+
!!! error TS2339: Property '2' does not exist on type '[number, any]'.
3838
var e4 = t4[3]; // number
3939
~
40-
!!! error TS2733: Index '3' is out-of-bounds in tuple of length 3.
40+
!!! error TS2339: Property '3' does not exist on type '[E1, E2, number]'.

tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(17,14): error TS2733: Index '4' is out-of-bounds in tuple of length 2.
2-
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(18,14): error TS2733: Index '4' is out-of-bounds in tuple of length 2.
3-
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(19,14): error TS2733: Index '4' is out-of-bounds in tuple of length 2.
4-
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(20,14): error TS2733: Index '2' is out-of-bounds in tuple of length 2.
5-
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(21,14): error TS2733: Index '2' is out-of-bounds in tuple of length 2.
1+
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(17,14): error TS2339: Property '4' does not exist on type '[C, base]'.
2+
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(18,14): error TS2339: Property '4' does not exist on type '[C, D]'.
3+
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(19,14): error TS2339: Property '4' does not exist on type '[C1, D1]'.
4+
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(20,14): error TS2339: Property '2' does not exist on type '[base1, C1]'.
5+
tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(21,14): error TS2339: Property '2' does not exist on type '[C1, F]'.
66

77

88
==== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts (5 errors) ====
@@ -24,17 +24,17 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfT
2424

2525
var e11 = t1[4]; // base
2626
~
27-
!!! error TS2733: Index '4' is out-of-bounds in tuple of length 2.
27+
!!! error TS2339: Property '4' does not exist on type '[C, base]'.
2828
var e21 = t2[4]; // {}
2929
~
30-
!!! error TS2733: Index '4' is out-of-bounds in tuple of length 2.
30+
!!! error TS2339: Property '4' does not exist on type '[C, D]'.
3131
var e31 = t3[4]; // C1
3232
~
33-
!!! error TS2733: Index '4' is out-of-bounds in tuple of length 2.
33+
!!! error TS2339: Property '4' does not exist on type '[C1, D1]'.
3434
var e41 = t4[2]; // base1
3535
~
36-
!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2.
36+
!!! error TS2339: Property '2' does not exist on type '[base1, C1]'.
3737
var e51 = t5[2]; // {}
3838
~
39-
!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2.
39+
!!! error TS2339: Property '2' does not exist on type '[C1, F]'.
4040

tests/baselines/reference/castingTuple.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ tests/cases/conformance/types/tuple/castingTuple.ts(14,15): error TS2352: Conver
66
tests/cases/conformance/types/tuple/castingTuple.ts(15,14): error TS2352: Conversion of type '[number, string]' to type '[number, string, boolean]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
77
tests/cases/conformance/types/tuple/castingTuple.ts(18,21): error TS2352: Conversion of type '[C, D]' to type '[C, D, A]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
88
Property '2' is missing in type '[C, D]'.
9-
tests/cases/conformance/types/tuple/castingTuple.ts(20,33): error TS2733: Index '5' is out-of-bounds in tuple of length 3.
9+
tests/cases/conformance/types/tuple/castingTuple.ts(20,33): error TS2339: Property '5' does not exist on type '[C, D, A]'.
1010
tests/cases/conformance/types/tuple/castingTuple.ts(30,10): error TS2352: Conversion of type '[number, string]' to type '[number, number]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
1111
Type 'string' is not comparable to type 'number'.
1212
tests/cases/conformance/types/tuple/castingTuple.ts(31,10): error TS2352: Conversion of type '[C, D]' to type '[A, I]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
@@ -50,7 +50,7 @@ tests/cases/conformance/types/tuple/castingTuple.ts(33,1): error TS2304: Cannot
5050
var eleFromCDA1 = classCDATuple[2]; // A
5151
var eleFromCDA2 = classCDATuple[5]; // C | D | A
5252
~
53-
!!! error TS2733: Index '5' is out-of-bounds in tuple of length 3.
53+
!!! error TS2339: Property '5' does not exist on type '[C, D, A]'.
5454
var t10: [E1, E2] = [E1.one, E2.one];
5555
var t11 = <[number, number]>t10;
5656
var array1 = <{}[]>emptyObjTuple;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts(2,11): error TS2733: Index '0' is out-of-bounds in tuple of length 0.
1+
tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts(2,11): error TS2339: Property '0' does not exist on type '[]'.
22

33

44
==== tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts (1 errors) ====
55
let x = <[]>[];
66
let y = x[0];
77
~
8-
!!! error TS2733: Index '0' is out-of-bounds in tuple of length 0.
8+
!!! error TS2339: Property '0' does not exist on type '[]'.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts(2,11): error TS2733: Index '0' is out-of-bounds in tuple of length 0.
1+
tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts(2,11): error TS2339: Property '0' does not exist on type '[]'.
22

33

44
==== tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts (1 errors) ====
55
let x = [] as [];
66
let y = x[0];
77
~
8-
!!! error TS2733: Index '0' is out-of-bounds in tuple of length 0.
8+
!!! error TS2339: Property '0' does not exist on type '[]'.

tests/baselines/reference/genericCallWithTupleType.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(12,1): error TS2322: Type '[string, number, boolean, boolean]' is not assignable to type '[string, number]'.
22
Types of property 'length' are incompatible.
33
Type '4' is not assignable to type '2'.
4-
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(13,20): error TS2733: Index '2' is out-of-bounds in tuple of length 2.
4+
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(13,20): error TS2339: Property '2' does not exist on type '[string, number]'.
55
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(14,1): error TS2322: Type '{ a: string; }' is not assignable to type 'undefined'.
6-
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(14,11): error TS2733: Index '3' is out-of-bounds in tuple of length 2.
7-
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(15,20): error TS2733: Index '3' is out-of-bounds in tuple of length 2.
6+
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(14,11): error TS2339: Property '3' does not exist on type '[string, number]'.
7+
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(15,20): error TS2339: Property '3' does not exist on type '[string, number]'.
88
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(22,14): error TS2322: Type 'number' is not assignable to type 'string'.
99
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(22,17): error TS2322: Type 'string' is not assignable to type 'number'.
1010
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(23,14): error TS2322: Type '{}' is not assignable to type 'string'.
@@ -32,15 +32,15 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTup
3232
!!! error TS2322: Type '4' is not assignable to type '2'.
3333
var e3 = i1.tuple1[2]; // {}
3434
~
35-
!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2.
35+
!!! error TS2339: Property '2' does not exist on type '[string, number]'.
3636
i1.tuple1[3] = { a: "string" };
3737
~~~~~~~~~~~~
3838
!!! error TS2322: Type '{ a: string; }' is not assignable to type 'undefined'.
3939
~
40-
!!! error TS2733: Index '3' is out-of-bounds in tuple of length 2.
40+
!!! error TS2339: Property '3' does not exist on type '[string, number]'.
4141
var e4 = i1.tuple1[3]; // {}
4242
~
43-
!!! error TS2733: Index '3' is out-of-bounds in tuple of length 2.
43+
!!! error TS2339: Property '3' does not exist on type '[string, number]'.
4444
i2.tuple1 = ["foo", 5];
4545
i2.tuple1 = ["foo", "bar"];
4646
i2.tuple1 = [5, "bar"];

tests/baselines/reference/indexerWithTuple.errors.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
tests/cases/conformance/types/tuple/indexerWithTuple.ts(11,25): error TS2733: Index '2' is out-of-bounds in tuple of length 2.
2-
tests/cases/conformance/types/tuple/indexerWithTuple.ts(17,27): error TS2733: Index '2' is out-of-bounds in tuple of length 2.
3-
tests/cases/conformance/types/tuple/indexerWithTuple.ts(20,30): error TS2733: Index '2' is out-of-bounds in tuple of length 2.
4-
tests/cases/conformance/types/tuple/indexerWithTuple.ts(28,30): error TS2733: Index '2' is out-of-bounds in tuple of length 2.
1+
tests/cases/conformance/types/tuple/indexerWithTuple.ts(11,25): error TS2339: Property '2' does not exist on type '[string, number]'.
2+
tests/cases/conformance/types/tuple/indexerWithTuple.ts(17,27): error TS2339: Property '2' does not exist on type '[number, [string, number]]'.
3+
tests/cases/conformance/types/tuple/indexerWithTuple.ts(20,30): error TS2339: Property '2' does not exist on type '[number, string | number]'.
4+
tests/cases/conformance/types/tuple/indexerWithTuple.ts(28,30): error TS2339: Property '2' does not exist on type '[boolean, string | number]'.
55

66

77
==== tests/cases/conformance/types/tuple/indexerWithTuple.ts (4 errors) ====
@@ -17,20 +17,20 @@ tests/cases/conformance/types/tuple/indexerWithTuple.ts(28,30): error TS2733: In
1717
var ele11 = strNumTuple[1]; // number
1818
var ele12 = strNumTuple[2]; // string | number
1919
~
20-
!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2.
20+
!!! error TS2339: Property '2' does not exist on type '[string, number]'.
2121
var ele13 = strNumTuple[idx0]; // string | number
2222
var ele14 = strNumTuple[idx1]; // string | number
2323
var ele15 = strNumTuple["0"]; // string
2424
var ele16 = strNumTuple["1"]; // number
2525
var strNumTuple1 = numTupleTuple[1]; //[string, number];
2626
var ele17 = numTupleTuple[2]; // number | [string, number]
2727
~
28-
!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2.
28+
!!! error TS2339: Property '2' does not exist on type '[number, [string, number]]'.
2929
var eleUnion10 = unionTuple1[0]; // number
3030
var eleUnion11 = unionTuple1[1]; // string | number
3131
var eleUnion12 = unionTuple1[2]; // string | number
3232
~
33-
!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2.
33+
!!! error TS2339: Property '2' does not exist on type '[number, string | number]'.
3434
var eleUnion13 = unionTuple1[idx0]; // string | number
3535
var eleUnion14 = unionTuple1[idx1]; // string | number
3636
var eleUnion15 = unionTuple1["0"]; // number
@@ -40,7 +40,7 @@ tests/cases/conformance/types/tuple/indexerWithTuple.ts(28,30): error TS2733: In
4040
var eleUnion21 = unionTuple2[1]; // string | number
4141
var eleUnion22 = unionTuple2[2]; // string | number | boolean
4242
~
43-
!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2.
43+
!!! error TS2339: Property '2' does not exist on type '[boolean, string | number]'.
4444
var eleUnion23 = unionTuple2[idx0]; // string | number | boolean
4545
var eleUnion24 = unionTuple2[idx1]; // string | number | boolean
4646
var eleUnion25 = unionTuple2["0"]; // boolean

tests/baselines/reference/keyofAndIndexedAccess.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ type Q21 = Shape[WIDTH_OR_HEIGHT]; // number
6161

6262
type Q30 = [string, number][0]; // string
6363
type Q31 = [string, number][1]; // number
64-
type Q32 = [string, number][2]; // string | number
64+
type Q32 = [string, number][number]; // string | number
6565
type Q33 = [string, number][E.A]; // string
6666
type Q34 = [string, number][E.B]; // number
67-
type Q35 = [string, number][E.C]; // string | number
68-
type Q36 = [string, number]["0"]; // string
69-
type Q37 = [string, number]["1"]; // string
67+
type Q35 = [string, number]["0"]; // string
68+
type Q36 = [string, number]["1"]; // string
7069

7170
type Q40 = (Shape | Options)["visible"]; // boolean | "yes" | "no"
7271
type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false & "yes" | false & "no"
@@ -1147,12 +1146,11 @@ declare type Q20 = Shape[NAME];
11471146
declare type Q21 = Shape[WIDTH_OR_HEIGHT];
11481147
declare type Q30 = [string, number][0];
11491148
declare type Q31 = [string, number][1];
1150-
declare type Q32 = [string, number][2];
1149+
declare type Q32 = [string, number][number];
11511150
declare type Q33 = [string, number][E.A];
11521151
declare type Q34 = [string, number][E.B];
1153-
declare type Q35 = [string, number][E.C];
1154-
declare type Q36 = [string, number]["0"];
1155-
declare type Q37 = [string, number]["1"];
1152+
declare type Q35 = [string, number]["0"];
1153+
declare type Q36 = [string, number]["1"];
11561154
declare type Q40 = (Shape | Options)["visible"];
11571155
declare type Q41 = (Shape & Options)["visible"];
11581156
declare type Q50 = Dictionary<Shape>["howdy"];

0 commit comments

Comments
 (0)