Skip to content

Commit f801420

Browse files
committed
Accepting new baselines
1 parent a0ddd43 commit f801420

18 files changed

+228
-492
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
tests/cases/compiler/declarationEmitDestructuring4.ts(9,22): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{}'.
2+
3+
4+
==== tests/cases/compiler/declarationEmitDestructuring4.ts (1 errors) ====
5+
// For an array binding pattern with empty elements,
6+
// we will not make any modification and will emit
7+
// the similar binding pattern users' have written
8+
function baz([]) { }
9+
function baz1([] = [1,2,3]) { }
10+
function baz2([[]] = [[1,2,3]]) { }
11+
12+
function baz3({}) { }
13+
function baz4({} = { x: 10 }) { }
14+
~
15+
!!! error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{}'.
16+
17+

Diff for: tests/baselines/reference/declarationEmitDestructuring4.symbols

-21
This file was deleted.

Diff for: tests/baselines/reference/declarationEmitDestructuring4.types

-32
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts(2,13): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{}'.
2+
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts(2,19): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{}'.
3+
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts(3,23): error TS2353: Object literal may only specify known properties, and 'y4' does not exist in type '{ x4: any; }'.
4+
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts(4,16): error TS2353: Object literal may only specify known properties, and 'x5' does not exist in type '{ y5: any; }'.
5+
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts(6,27): error TS2353: Object literal may only specify known properties, and 'y7' does not exist in type '{ x7: any; }'.
6+
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts(7,20): error TS2353: Object literal may only specify known properties, and 'x8' does not exist in type '{ y8: any; }'.
7+
8+
9+
==== tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts (6 errors) ====
10+
11+
var { } = { x: 5, y: "hello" };
12+
~
13+
!!! error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{}'.
14+
~
15+
!!! error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{}'.
16+
var { x4 } = { x4: 5, y4: "hello" };
17+
~~
18+
!!! error TS2353: Object literal may only specify known properties, and 'y4' does not exist in type '{ x4: any; }'.
19+
var { y5 } = { x5: 5, y5: "hello" };
20+
~~
21+
!!! error TS2353: Object literal may only specify known properties, and 'x5' does not exist in type '{ y5: any; }'.
22+
var { x6, y6 } = { x6: 5, y6: "hello" };
23+
var { x7: a1 } = { x7: 5, y7: "hello" };
24+
~~
25+
!!! error TS2353: Object literal may only specify known properties, and 'y7' does not exist in type '{ x7: any; }'.
26+
var { y8: b1 } = { x8: 5, y8: "hello" };
27+
~~
28+
!!! error TS2353: Object literal may only specify known properties, and 'x8' does not exist in type '{ y8: any; }'.
29+
var { x9: a2, y9: b2 } = { x9: 5, y9: "hello" };
30+
31+
var { a: x11, b: { a: y11, b: { a: z11 }}} = { a: 1, b: { a: "hello", b: { a: true } } };
32+
33+
function f15() {
34+
var a4 = "hello";
35+
var b4 = 1;
36+
var c4 = true;
37+
return { a4, b4, c4 };
38+
}
39+
var { a4, b4, c4 } = f15();
40+
41+
module m {
42+
export var { a4, b4, c4 } = f15();
43+
}

Diff for: tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern.symbols

-89
This file was deleted.

Diff for: tests/baselines/reference/declarationEmitDestructuringObjectLiteralPattern.types

-122
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts(2,13): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{}'.
2+
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts(2,19): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{}'.
3+
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts(3,23): error TS2353: Object literal may only specify known properties, and 'y4' does not exist in type '{ x4: any; }'.
4+
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts(4,16): error TS2353: Object literal may only specify known properties, and 'x5' does not exist in type '{ y5: any; }'.
5+
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts(6,27): error TS2353: Object literal may only specify known properties, and 'y7' does not exist in type '{ x7: any; }'.
6+
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts(7,20): error TS2353: Object literal may only specify known properties, and 'x8' does not exist in type '{ y8: any; }'.
7+
8+
9+
==== tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts (6 errors) ====
10+
11+
var { } = { x: 5, y: "hello" };
12+
~
13+
!!! error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{}'.
14+
~
15+
!!! error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{}'.
16+
var { x4 } = { x4: 5, y4: "hello" };
17+
~~
18+
!!! error TS2353: Object literal may only specify known properties, and 'y4' does not exist in type '{ x4: any; }'.
19+
var { y5 } = { x5: 5, y5: "hello" };
20+
~~
21+
!!! error TS2353: Object literal may only specify known properties, and 'x5' does not exist in type '{ y5: any; }'.
22+
var { x6, y6 } = { x6: 5, y6: "hello" };
23+
var { x7: a1 } = { x7: 5, y7: "hello" };
24+
~~
25+
!!! error TS2353: Object literal may only specify known properties, and 'y7' does not exist in type '{ x7: any; }'.
26+
var { y8: b1 } = { x8: 5, y8: "hello" };
27+
~~
28+
!!! error TS2353: Object literal may only specify known properties, and 'x8' does not exist in type '{ y8: any; }'.
29+
var { x9: a2, y9: b2 } = { x9: 5, y9: "hello" };

0 commit comments

Comments
 (0)