Skip to content

Commit 57ed264

Browse files
committed
Accept new baselines
1 parent 43811dd commit 57ed264

17 files changed

+93
-57
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts(3,8): error TS2459: Type 'undefined' has no property 'a' and no string index signature.
2-
tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts(3,18): error TS2459: Type 'undefined' has no property 'b' and no string index signature.
1+
tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts(3,8): error TS2339: Property 'a' does not exist on type 'undefined'.
2+
tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts(3,18): error TS2339: Property 'b' does not exist on type 'undefined'.
33

44

55
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts (2 errors) ====
66
var a: string, b: number;
77

88
for ({ a: b = 1, b: a = ""} of []) {
99
~
10-
!!! error TS2459: Type 'undefined' has no property 'a' and no string index signature.
10+
!!! error TS2339: Property 'a' does not exist on type 'undefined'.
1111
~
12-
!!! error TS2459: Type 'undefined' has no property 'b' and no string index signature.
12+
!!! error TS2339: Property 'b' does not exist on type 'undefined'.
1313
a;
1414
b;
1515
}

tests/baselines/reference/arityAndOrderCompatibility01.errors.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(15,12): error TS2493: Tuple type '[string, number]' with length '2' cannot be assigned to tuple with length '3'.
2-
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(16,12): error TS2460: Type 'StrNum' has no property '2'.
1+
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(15,12): error TS2339: Property '2' does not exist on type '[string, number]'.
32
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(17,5): error TS2461: Type '{ 0: string; 1: number; length: 2; }' is not an array type.
4-
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(17,12): error TS2460: Type '{ 0: string; 1: number; length: 2; }' has no property '2'.
53
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(18,5): error TS2741: Property '2' is missing in type '[string, number]' but required in type '[number, number, number]'.
64
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(19,5): error TS2741: Property '2' is missing in type 'StrNum' but required in type '[number, number, number]'.
75
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(20,5): error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[number, number, number]': 2, pop, push, concat, and 16 more.
@@ -30,7 +28,7 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(31,5): error
3028
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[number, string]': pop, push, concat, join, and 15 more.
3129

3230

33-
==== tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts (19 errors) ====
31+
==== tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts (17 errors) ====
3432
interface StrNum extends Array<string|number> {
3533
0: string;
3634
1: number;
@@ -47,15 +45,11 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error
4745

4846
var [a, b, c] = x;
4947
~
50-
!!! error TS2493: Tuple type '[string, number]' with length '2' cannot be assigned to tuple with length '3'.
48+
!!! error TS2339: Property '2' does not exist on type '[string, number]'.
5149
var [d, e, f] = y;
52-
~
53-
!!! error TS2460: Type 'StrNum' has no property '2'.
5450
var [g, h, i] = z;
5551
~~~~~~~~~
5652
!!! error TS2461: Type '{ 0: string; 1: number; length: 2; }' is not an array type.
57-
~
58-
!!! error TS2460: Type '{ 0: string; 1: number; length: 2; }' has no property '2'.
5953
var j1: [number, number, number] = x;
6054
~~
6155
!!! error TS2741: Property '2' is missing in type '[string, number]' but required in type '[number, number, number]'.

tests/baselines/reference/arityAndOrderCompatibility01.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ var z: {
3232
var [a, b, c] = x;
3333
>a : string
3434
>b : number
35-
>c : any
35+
>c : undefined
3636
>x : [string, number]
3737

3838
var [d, e, f] = y;
3939
>d : string
4040
>e : number
41-
>f : any
41+
>f : string | number
4242
>y : StrNum
4343

4444
var [g, h, i] = z;
45-
>g : string
46-
>h : number
45+
>g : any
46+
>h : any
4747
>i : any
4848
>z : { 0: string; 1: number; length: 2; }
4949

tests/baselines/reference/computedPropertiesInDestructuring1.errors.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ tests/cases/compiler/computedPropertiesInDestructuring1.ts(20,8): error TS2349:
1010
tests/cases/compiler/computedPropertiesInDestructuring1.ts(20,8): error TS2538: Type 'any' cannot be used as an index type.
1111
tests/cases/compiler/computedPropertiesInDestructuring1.ts(21,8): error TS2538: Type 'any' cannot be used as an index type.
1212
tests/cases/compiler/computedPropertiesInDestructuring1.ts(21,12): error TS2339: Property 'toExponential' does not exist on type 'string'.
13+
tests/cases/compiler/computedPropertiesInDestructuring1.ts(24,4): error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
14+
tests/cases/compiler/computedPropertiesInDestructuring1.ts(28,4): error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
15+
tests/cases/compiler/computedPropertiesInDestructuring1.ts(30,4): error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
16+
tests/cases/compiler/computedPropertiesInDestructuring1.ts(31,4): error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
1317
tests/cases/compiler/computedPropertiesInDestructuring1.ts(33,4): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
18+
tests/cases/compiler/computedPropertiesInDestructuring1.ts(33,4): error TS2538: Type 'any' cannot be used as an index type.
19+
tests/cases/compiler/computedPropertiesInDestructuring1.ts(34,4): error TS2538: Type 'any' cannot be used as an index type.
1420
tests/cases/compiler/computedPropertiesInDestructuring1.ts(34,5): error TS2365: Operator '+' cannot be applied to types '1' and '{}'.
1521

1622

17-
==== tests/cases/compiler/computedPropertiesInDestructuring1.ts (14 errors) ====
23+
==== tests/cases/compiler/computedPropertiesInDestructuring1.ts (20 errors) ====
1824
// destructuring in variable declarations
1925
let foo = "bar";
2026
let {[foo]: bar} = {bar: "bar"};
@@ -63,18 +69,30 @@ tests/cases/compiler/computedPropertiesInDestructuring1.ts(34,5): error TS2365:
6369

6470
// destructuring assignment
6571
({[foo]: bar} = {bar: "bar"});
72+
~~~
73+
!!! error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
6674

6775
({["bar"]: bar2} = {bar: "bar"});
6876

6977
({[foo2()]: bar3} = {bar: "bar"});
78+
~~~~~~
79+
!!! error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
7080

7181
[{[foo]: bar4}] = [{bar: "bar"}];
82+
~~~
83+
!!! error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
7284
[{[foo2()]: bar5}] = [{bar: "bar"}];
85+
~~~~~~
86+
!!! error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
7387

7488
[{[foo()]: bar4}] = [{bar: "bar"}];
7589
~~~~~
7690
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
91+
~~~~~
92+
!!! error TS2538: Type 'any' cannot be used as an index type.
7793
[{[(1 + {})]: bar4}] = [{bar: "bar"}];
94+
~~~~~~~~
95+
!!! error TS2538: Type 'any' cannot be used as an index type.
7896
~~~~~~
7997
!!! error TS2365: Operator '+' cannot be applied to types '1' and '{}'.
8098

tests/baselines/reference/computedPropertiesInDestructuring1_ES6.errors.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(21,8): error TS23
1010
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(21,8): error TS2538: Type 'any' cannot be used as an index type.
1111
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(22,8): error TS2538: Type 'any' cannot be used as an index type.
1212
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(22,12): error TS2339: Property 'toExponential' does not exist on type 'string'.
13+
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(25,4): error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
14+
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(29,4): error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
15+
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(31,4): error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
16+
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(32,4): error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
1317
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(34,4): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
18+
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(34,4): error TS2538: Type 'any' cannot be used as an index type.
19+
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(35,4): error TS2538: Type 'any' cannot be used as an index type.
1420
tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(35,5): error TS2365: Operator '+' cannot be applied to types '1' and '{}'.
1521

1622

17-
==== tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts (14 errors) ====
23+
==== tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts (20 errors) ====
1824
// destructuring in variable declarations
1925
let foo = "bar";
2026
let {[foo]: bar} = {bar: "bar"};
@@ -64,18 +70,30 @@ tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts(35,5): error TS23
6470

6571
// destructuring assignment
6672
({[foo]: bar} = {bar: "bar"});
73+
~~~
74+
!!! error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
6775

6876
({["bar"]: bar2} = {bar: "bar"});
6977

7078
({[foo2()]: bar3} = {bar: "bar"});
79+
~~~~~~
80+
!!! error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
7181

7282
[{[foo]: bar4}] = [{bar: "bar"}];
83+
~~~
84+
!!! error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
7385
[{[foo2()]: bar5}] = [{bar: "bar"}];
86+
~~~~~~
87+
!!! error TS2537: Type '{ bar: string; }' has no matching index signature for type 'string'.
7488

7589
[{[foo()]: bar4}] = [{bar: "bar"}];
7690
~~~~~
7791
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
92+
~~~~~
93+
!!! error TS2538: Type 'any' cannot be used as an index type.
7894
[{[(1 + {})]: bar4}] = [{bar: "bar"}];
95+
~~~~~~~~
96+
!!! error TS2538: Type 'any' cannot be used as an index type.
7997
~~~~~~
8098
!!! error TS2365: Operator '+' cannot be applied to types '1' and '{}'.
8199

tests/baselines/reference/declarationsAndAssignments.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ function f9() {
277277
>{} : {}
278278

279279
var [c, d] = { 0: 10, 1: 20 }; // Error, not array type
280-
>c : number
281-
>d : number
280+
>c : any
281+
>d : any
282282
>{ 0: 10, 1: 20 } : { 0: number; 1: number; }
283283
>0 : number
284284
>10 : 10

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment2.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var [b3 = "string", b4, b5] = bar(); // Error
4242
>b3 : string | Number
4343
>"string" : "string"
4444
>b4 : Number
45-
>b5 : Number
45+
>b5 : number
4646
>bar() : J
4747
>bar : () => J
4848

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
tests/cases/compiler/emitCapturingThisInTupleDestructuring1.ts(3,17): error TS2493: Tuple type '[any]' with length '1' cannot be assigned to tuple with length '3'.
2-
tests/cases/compiler/emitCapturingThisInTupleDestructuring1.ts(3,29): error TS2493: Tuple type '[any]' with length '1' cannot be assigned to tuple with length '3'.
1+
tests/cases/compiler/emitCapturingThisInTupleDestructuring1.ts(3,17): error TS2339: Property '1' does not exist on type '[any]'.
2+
tests/cases/compiler/emitCapturingThisInTupleDestructuring1.ts(3,29): error TS2339: Property '2' does not exist on type '[any]'.
33

44

55
==== tests/cases/compiler/emitCapturingThisInTupleDestructuring1.ts (2 errors) ====
66
declare function wrapper(x: any);
77
wrapper((array: [any]) => {
88
[this.test, this.test1, this.test2] = array; // even though there is a compiler error, we should still emit lexical capture for "this"
99
~~~~~~~~~~
10-
!!! error TS2493: Tuple type '[any]' with length '1' cannot be assigned to tuple with length '3'.
10+
!!! error TS2339: Property '1' does not exist on type '[any]'.
1111
~~~~~~~~~~
12-
!!! error TS2493: Tuple type '[any]' with length '1' cannot be assigned to tuple with length '3'.
12+
!!! error TS2339: Property '2' does not exist on type '[any]'.
1313
});

tests/baselines/reference/emitCapturingThisInTupleDestructuring2.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/emitCapturingThisInTupleDestructuring2.ts(8,39): error TS2493: Tuple type '[number, number]' with length '2' cannot be assigned to tuple with length '3'.
1+
tests/cases/compiler/emitCapturingThisInTupleDestructuring2.ts(8,39): error TS2339: Property '2' does not exist on type '[number, number]'.
22

33

44
==== tests/cases/compiler/emitCapturingThisInTupleDestructuring2.ts (1 errors) ====
@@ -11,6 +11,6 @@ tests/cases/compiler/emitCapturingThisInTupleDestructuring2.ts(8,39): error TS24
1111
method() {
1212
() => [this.test, this.test1, this.test2] = array1; // even though there is a compiler error, we should still emit lexical capture for "this"
1313
~~~~~~~~~~
14-
!!! error TS2493: Tuple type '[number, number]' with length '2' cannot be assigned to tuple with length '3'.
14+
!!! error TS2339: Property '2' does not exist on type '[number, number]'.
1515
}
1616
}

tests/baselines/reference/iterableArrayPattern21.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
=== tests/cases/conformance/es6/destructuring/iterableArrayPattern21.ts ===
22
var [a, b] = { 0: "", 1: true };
3-
>a : string
4-
>b : boolean
3+
>a : any
4+
>b : any
55
>{ 0: "", 1: true } : { 0: string; 1: boolean; }
66
>0 : string
77
>"" : ""

0 commit comments

Comments
 (0)