Skip to content

Commit 66e3aba

Browse files
committed
Accepting new baselines
1 parent f28e424 commit 66e3aba

15 files changed

+24
-36
lines changed

tests/baselines/reference/arrowFunctionExpressions.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ var p8 = ({ a = 1 }) => { };
100100
>1 : number
101101

102102
var p9 = ({ a: { b = 1 } = { b: 1 } }) => { };
103-
>p9 : ({ a: { b = 1 } = { b: 1 } }: { a?: { b: number; }; }) => void
104-
>({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b = 1 } = { b: 1 } }: { a?: { b: number; }; }) => void
103+
>p9 : ({ a: { b = 1 } = { b: 1 } }: { a?: { b?: number; }; }) => void
104+
>({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b = 1 } = { b: 1 } }: { a?: { b?: number; }; }) => void
105105
>a : any
106106
>b : number
107107
>1 : number
108-
>{ b: 1 } : { b: number; }
108+
>{ b: 1 } : { b?: number; }
109109
>b : number
110110
>1 : number
111111

tests/baselines/reference/declarationEmitDestructuring2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ function h1(_a) {
2121

2222
//// [declarationEmitDestructuring2.d.ts]
2323
declare function f({x, y: [a, b, c, d]}?: {
24-
x: number;
25-
y: [number, number, number, number];
24+
x?: number;
25+
y?: [number, number, number, number];
2626
}): void;
2727
declare function g([a, b, c, d]?: [number, number, number, number]): void;
2828
declare function h([a, [b], [[c]], {x, y: [a, b, c], z: {a1, b1}}]: [any, [any], [[any]], {

tests/baselines/reference/declarationEmitDestructuringArrayPattern2.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var [a11, b11, c11] = [];
2323
>a11 : any
2424
>b11 : any
2525
>c11 : any
26-
>[] : undefined[]
26+
>[] : [any, any, any]
2727

2828
var [a2, [b2, { x12, y12: c2 }]=["abc", { x12: 10, y12: false }]] = [1, ["hello", { x12: 5, y12: true }]];
2929
>a2 : number

tests/baselines/reference/declarationsAndAssignments.errors.txt

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(5,16): error TS2493: Tuple type '[number, string]' with length '2' cannot be assigned to tuple with length '3'.
1+
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(6,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'any', but here has type 'number'.
22
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(56,17): error TS2322: Type 'number' is not assignable to type 'string'.
3-
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,13): error TS2493: Tuple type '[number]' with length '1' cannot be assigned to tuple with length '3'.
4-
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,16): error TS2493: Tuple type '[number]' with length '1' cannot be assigned to tuple with length '3'.
53
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(67,9): error TS2461: Type '{ [x: number]: undefined; }' is not an array type.
64
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(68,9): error TS2461: Type '{ [x: number]: number; 0: number; 1: number; }' is not an array type.
75
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(73,11): error TS2459: Type '{}' has no property 'a' and no string index signature.
@@ -18,15 +16,15 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,6):
1816
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9): error TS2322: Type 'number' is not assignable to type 'string'.
1917

2018

21-
==== tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts (13 errors) ====
19+
==== tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts (11 errors) ====
2220
function f0() {
2321
var [] = [1, "hello"];
2422
var [x] = [1, "hello"];
2523
var [x, y] = [1, "hello"];
2624
var [x, y, z] = [1, "hello"]; // Error
27-
~
28-
!!! error TS2493: Tuple type '[number, string]' with length '2' cannot be assigned to tuple with length '3'.
2925
var [,, z] = [0, 1, 2];
26+
~
27+
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'any', but here has type 'number'.
3028
var x: number;
3129
var y: string;
3230
}
@@ -86,10 +84,6 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9):
8684
function f8() {
8785
var [a, b, c] = []; // Ok, [] is an array
8886
var [d, e, f] = [1]; // Error, [1] is a tuple
89-
~
90-
!!! error TS2493: Tuple type '[number]' with length '1' cannot be assigned to tuple with length '3'.
91-
~
92-
!!! error TS2493: Tuple type '[number]' with length '1' cannot be assigned to tuple with length '3'.
9387
}
9488

9589
function f9() {

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ var [c0, c1] = [...temp];
9393

9494
var [c2] = [];
9595
>c2 : any
96-
>[] : undefined[]
96+
>[] : [any]
9797

9898
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
9999
>c3 : any

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES6.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ var [c0, c1] = [...temp];
9494

9595
var [c2] = [];
9696
>c2 : any
97-
>[] : undefined[]
97+
>[] : [any]
9898

9999
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
100100
>c3 : any

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment2.errors.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,6): error TS2461: Type 'undefined' is not an array type.
2-
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,12): error TS2461: Type 'undefined' is not an array type.
31
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(4,5): error TS2461: Type 'undefined' is not an array type.
42
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(9,5): error TS2322: Type '[number, number, string]' is not assignable to type '[number, boolean, string]'.
53
Types of property '1' are incompatible.
@@ -13,14 +11,10 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
1311
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(34,5): error TS2461: Type 'F' is not an array type.
1412

1513

16-
==== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts (8 errors) ====
14+
==== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts (6 errors) ====
1715
// V is an array assignment pattern, S is the type Any or an array-like type (section 3.3.2), and, for each assignment element E in V,
1816
// S is the type Any, or
1917
var [[a0], [[a1]]] = [] // Error
20-
~~~~
21-
!!! error TS2461: Type 'undefined' is not an array type.
22-
~~~~~~
23-
!!! error TS2461: Type 'undefined' is not an array type.
2418
var [[a2], [[a3]]] = undefined // Error
2519
~~~~~~~~~~~~~~
2620
!!! error TS2461: Type 'undefined' is not an array type.

tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var { b2: { b21 } = { b21: "string" } } = { b2: { b21: "world" } };
2727
>{ b21: "string" } : { b21: string; }
2828
>b21 : string
2929
>"string" : string
30-
>{ b2: { b21: "world" } } : { b2: { b21: string; }; }
30+
>{ b2: { b21: "world" } } : { b2?: { b21: string; }; }
3131
>b2 : { b21: string; }
3232
>{ b21: "world" } : { b21: string; }
3333
>b21 : string

tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var { b2: { b21 } = { b21: "string" } } = { b2: { b21: "world" } };
2727
>{ b21: "string" } : { b21: string; }
2828
>b21 : string
2929
>"string" : string
30-
>{ b2: { b21: "world" } } : { b2: { b21: string; }; }
30+
>{ b2: { b21: "world" } } : { b2?: { b21: string; }; }
3131
>b2 : { b21: string; }
3232
>{ b21: "world" } : { b21: string; }
3333
>b21 : string

tests/baselines/reference/destructuringVariableDeclaration1ES5.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var { b1: { b11 } = { b11: "string" } } = { b1: { b11: "world" } };
3131
>{ b11: "string" } : { b11: string; }
3232
>b11 : string
3333
>"string" : string
34-
>{ b1: { b11: "world" } } : { b1: { b11: string; }; }
34+
>{ b1: { b11: "world" } } : { b1?: { b11: string; }; }
3535
>b1 : { b11: string; }
3636
>{ b11: "world" } : { b11: string; }
3737
>b11 : string

tests/baselines/reference/destructuringVariableDeclaration1ES6.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var { b1: { b11 } = { b11: "string" } } = { b1: { b11: "world" } };
3131
>{ b11: "string" } : { b11: string; }
3232
>b11 : string
3333
>"string" : string
34-
>{ b1: { b11: "world" } } : { b1: { b11: string; }; }
34+
>{ b1: { b11: "world" } } : { b1?: { b11: string; }; }
3535
>b1 : { b11: string; }
3636
>{ b11: "world" } : { b11: string; }
3737
>b11 : string

tests/baselines/reference/downlevelLetConst12.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const bar = 1;
1313

1414
let [baz] = [];
1515
>baz : any
16-
>[] : undefined[]
16+
>[] : [any]
1717

1818
let {a: baz2} = { a: 1 };
1919
>a : any
@@ -24,7 +24,7 @@ let {a: baz2} = { a: 1 };
2424

2525
const [baz3] = []
2626
>baz3 : any
27-
>[] : undefined[]
27+
>[] : [any]
2828

2929
const {a: baz4} = { a: 1 };
3030
>a : any

tests/baselines/reference/emitArrowFunctionES6.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ var p8 = ({ a = 1 }) => { };
8787
>1 : number
8888

8989
var p9 = ({ a: { b = 1 } = { b: 1 } }) => { };
90-
>p9 : ({ a: { b = 1 } = { b: 1 } }: { a?: { b: number; }; }) => void
91-
>({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b = 1 } = { b: 1 } }: { a?: { b: number; }; }) => void
90+
>p9 : ({ a: { b = 1 } = { b: 1 } }: { a?: { b?: number; }; }) => void
91+
>({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b = 1 } = { b: 1 } }: { a?: { b?: number; }; }) => void
9292
>a : any
9393
>b : number
9494
>1 : number
95-
>{ b: 1 } : { b: number; }
95+
>{ b: 1 } : { b?: number; }
9696
>b : number
9797
>1 : number
9898

tests/baselines/reference/nonIterableRestElement1.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var c = {};
55

66
[...c] = ["", 0];
77
>[...c] = ["", 0] : (string | number)[]
8-
>[...c] : {}[]
8+
>[...c] : undefined[]
99
>...c : any
1010
>c : {}
1111
>["", 0] : (string | number)[]

tests/baselines/reference/nonIterableRestElement2.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var c = {};
55

66
[...c] = ["", 0];
77
>[...c] = ["", 0] : (string | number)[]
8-
>[...c] : {}[]
8+
>[...c] : undefined[]
99
>...c : any
1010
>c : {}
1111
>["", 0] : (string | number)[]

0 commit comments

Comments
 (0)