Skip to content

Commit fe80303

Browse files
committed
accept baseline
1 parent b15b484 commit fe80303

17 files changed

+58
-58
lines changed

tests/baselines/reference/contextuallyTypedBindingInitializerNegative.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interface Show {
55
>x : number
66
}
77
function f({ show: showRename = v => v }: Show) {}
8-
>f : ({ show: showRename }: Show) => void
8+
>f : ({ show }: Show) => void
99
>show : any
1010
>showRename : (x: number) => string
1111
>v => v : (v: number) => number
@@ -32,7 +32,7 @@ interface Nested {
3232
>nested : Show
3333
}
3434
function ff({ nested: nestedRename = { show: v => v } }: Nested) {}
35-
>ff : ({ nested: nestedRename }: Nested) => void
35+
>ff : ({ nested }: Nested) => void
3636
>nested : any
3737
>nestedRename : Show
3838
>{ show: v => v } : { show: (v: number) => number; }

tests/baselines/reference/declarationsAndAssignments.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ function f13() {
417417
}
418418

419419
function f14([a = 1, [b = "hello", { x, y: c = false }]]) {
420-
>f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void
420+
>f14 : ([a, [b, { x, y }]]: [number, [string, { x: any; y?: boolean; }]]) => void
421421
>a : number
422422
>1 : 1
423423
>b : string
@@ -438,7 +438,7 @@ function f14([a = 1, [b = "hello", { x, y: c = false }]]) {
438438
}
439439
f14([2, ["abc", { x: 0, y: true }]]);
440440
>f14([2, ["abc", { x: 0, y: true }]]) : void
441-
>f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void
441+
>f14 : ([a, [b, { x, y }]]: [number, [string, { x: any; y?: boolean; }]]) => void
442442
>[2, ["abc", { x: 0, y: true }]] : [number, [string, { x: number; y: true; }]]
443443
>2 : 2
444444
>["abc", { x: 0, y: true }] : [string, { x: number; y: true; }]
@@ -451,7 +451,7 @@ f14([2, ["abc", { x: 0, y: true }]]);
451451

452452
f14([2, ["abc", { x: 0 }]]);
453453
>f14([2, ["abc", { x: 0 }]]) : void
454-
>f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void
454+
>f14 : ([a, [b, { x, y }]]: [number, [string, { x: any; y?: boolean; }]]) => void
455455
>[2, ["abc", { x: 0 }]] : [number, [string, { x: number; }]]
456456
>2 : 2
457457
>["abc", { x: 0 }] : [string, { x: number; }]
@@ -462,7 +462,7 @@ f14([2, ["abc", { x: 0 }]]);
462462

463463
f14([2, ["abc", { y: false }]]); // Error, no x
464464
>f14([2, ["abc", { y: false }]]) : void
465-
>f14 : ([a, [b, { x, y: c }]]: [number, [string, { x: any; y?: boolean; }]]) => void
465+
>f14 : ([a, [b, { x, y }]]: [number, [string, { x: any; y?: boolean; }]]) => void
466466
>[2, ["abc", { y: false }]] : [number, [string, { y: false; }]]
467467
>2 : 2
468468
>["abc", { y: false }] : [string, { y: false; }]

tests/baselines/reference/destructuringParameterDeclaration1ES5.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ d5(); // Parameter is optional as its declaration included an initializer
402402
// Type annotations must instead be written on the top- level parameter declaration
403403

404404
function e1({x: number}) { } // x has type any NOT number
405-
>e1 : ({ x: number }: { x: any; }) => void
405+
>e1 : ({ x }: { x: any; }) => void
406406
>x : any
407407
>number : any
408408

tests/baselines/reference/destructuringParameterDeclaration1ES5iterable.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ d5(); // Parameter is optional as its declaration included an initializer
402402
// Type annotations must instead be written on the top- level parameter declaration
403403

404404
function e1({x: number}) { } // x has type any NOT number
405-
>e1 : ({ x: number }: { x: any; }) => void
405+
>e1 : ({ x }: { x: any; }) => void
406406
>x : any
407407
>number : any
408408

tests/baselines/reference/destructuringParameterDeclaration1ES6.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ d5(); // Parameter is optional as its declaration included an initializer
376376
// Type annotations must instead be written on the top- level parameter declaration
377377

378378
function e1({x: number}) { } // x has type any NOT number
379-
>e1 : ({ x: number }: { x: any; }) => void
379+
>e1 : ({ x }: { x: any; }) => void
380380
>x : any
381381
>number : any
382382

tests/baselines/reference/destructuringParameterDeclaration6.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// Error
99
function a({while}) { }
10-
>a : ({ while: }: { while: any; }) => void
10+
>a : ({ while }: { while: any; }) => void
1111
>while : any
1212
> : any
1313

@@ -42,32 +42,32 @@ function a7(...a: string) { }
4242

4343
a({ while: 1 });
4444
>a({ while: 1 }) : void
45-
>a : ({ while: }: { while: any; }) => void
45+
>a : ({ while }: { while: any; }) => void
4646
>{ while: 1 } : { while: number; }
4747
>while : number
4848
>1 : 1
4949

5050
// No Error
5151
function b1({public: x}) { }
52-
>b1 : ({ public: x }: { public: any; }) => void
52+
>b1 : ({ public }: { public: any; }) => void
5353
>public : any
5454
>x : any
5555

5656
function b2({while: y}) { }
57-
>b2 : ({ while: y }: { while: any; }) => void
57+
>b2 : ({ while }: { while: any; }) => void
5858
>while : any
5959
>y : any
6060

6161
b1({ public: 1 });
6262
>b1({ public: 1 }) : void
63-
>b1 : ({ public: x }: { public: any; }) => void
63+
>b1 : ({ public }: { public: any; }) => void
6464
>{ public: 1 } : { public: number; }
6565
>public : number
6666
>1 : 1
6767

6868
b2({ while: 1 });
6969
>b2({ while: 1 }) : void
70-
>b2 : ({ while: y }: { while: any; }) => void
70+
>b2 : ({ while }: { while: any; }) => void
7171
>{ while: 1 } : { while: number; }
7272
>while : number
7373
>1 : 1

tests/baselines/reference/excessPropertyCheckWithSpread.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== tests/cases/compiler/excessPropertyCheckWithSpread.ts ===
22
declare function f({ a: number }): void
3-
>f : ({ a: number }: { a: any; }) => void
3+
>f : ({ a }: { a: any; }) => void
44
>a : any
55
>number : any
66

@@ -13,7 +13,7 @@ declare let i: I;
1313

1414
f({ a: 1, ...i });
1515
>f({ a: 1, ...i }) : void
16-
>f : ({ a: number }: { a: any; }) => void
16+
>f : ({ a }: { a: any; }) => void
1717
>{ a: 1, ...i } : { n: number; a: number; }
1818
>a : number
1919
>1 : 1
@@ -35,7 +35,7 @@ declare let r: R;
3535

3636
f({ a: 1, ...l, ...r });
3737
>f({ a: 1, ...l, ...r }) : void
38-
>f : ({ a: number }: { a: any; }) => void
38+
>f : ({ a }: { a: any; }) => void
3939
>{ a: 1, ...l, ...r } : { opt: string | number; a: number; }
4040
>a : number
4141
>1 : 1

tests/baselines/reference/objectRestParameter.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ declare function suddenly(f: (a: { x: { z, ka }, y: string }) => void);
1919
suddenly(({ x: a, ...rest }) => rest.y);
2020
>suddenly(({ x: a, ...rest }) => rest.y) : any
2121
>suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any
22-
>({ x: a, ...rest }) => rest.y : ({ x: a, ...rest }: { x: { z: any; ka: any; }; y: string; }) => string
22+
>({ x: a, ...rest }) => rest.y : ({ x, ...rest }: { x: { z: any; ka: any; }; y: string; }) => string
2323
>x : any
2424
>a : { z: any; ka: any; }
2525
>rest : { y: string; }

tests/baselines/reference/objectRestParameterES5.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ declare function suddenly(f: (a: { x: { z, ka }, y: string }) => void);
1919
suddenly(({ x: a, ...rest }) => rest.y);
2020
>suddenly(({ x: a, ...rest }) => rest.y) : any
2121
>suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any
22-
>({ x: a, ...rest }) => rest.y : ({ x: a, ...rest }: { x: { z: any; ka: any; }; y: string; }) => string
22+
>({ x: a, ...rest }) => rest.y : ({ x, ...rest }: { x: { z: any; ka: any; }; y: string; }) => string
2323
>x : any
2424
>a : { z: any; ka: any; }
2525
>rest : { y: string; }

tests/baselines/reference/renamingDestructuredPropertyInFunctionType.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ type F = ({a: string}) => void;
55
>string : any
66

77
const f = ({a: string}) => string;
8-
>f : ({ a: string }: { a: any; }) => any
9-
>({a: string}) => string : ({ a: string }: { a: any; }) => any
8+
>f : ({ a }: { a: any; }) => any
9+
>({a: string}) => string : ({ a }: { a: any; }) => any
1010
>a : any
1111
>string : any
1212
>string : any

tests/baselines/reference/renamingDestructuredPropertyInFunctionType2.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ type F = ({a: string}) => void;
55
>string : any
66

77
const f = ({a: string}) => string;
8-
>f : ({ a: string }: { a: any; }) => any
9-
>({a: string}) => string : ({ a: string }: { a: any; }) => any
8+
>f : ({ a }: { a: any; }) => any
9+
>({a: string}) => string : ({ a }: { a: any; }) => any
1010
>a : any
1111
>string : any
1212
>string : any

tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "no
3434
>"none" : "none"
3535

3636
function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) {
37-
>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) => void
37+
>foo1 : ({ skills: { primary, secondary } }: Robot) => void
3838
>skills : any
3939
>primary : any
4040
>primaryA : string
@@ -49,7 +49,7 @@ function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) {
4949
>primaryA : string
5050
}
5151
function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) {
52-
>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) => void
52+
>foo2 : ({ name, skills: { primary, secondary } }: Robot) => void
5353
>name : any
5454
>nameC : string
5555
>skills : any
@@ -81,12 +81,12 @@ function foo3({ skills }: Robot) {
8181

8282
foo1(robotA);
8383
>foo1(robotA) : void
84-
>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) => void
84+
>foo1 : ({ skills: { primary, secondary } }: Robot) => void
8585
>robotA : Robot
8686

8787
foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } });
8888
>foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void
89-
>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) => void
89+
>foo1 : ({ skills: { primary, secondary } }: Robot) => void
9090
>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; }
9191
>name : string
9292
>"Edger" : "Edger"
@@ -99,12 +99,12 @@ foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming"
9999

100100
foo2(robotA);
101101
>foo2(robotA) : void
102-
>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) => void
102+
>foo2 : ({ name, skills: { primary, secondary } }: Robot) => void
103103
>robotA : Robot
104104

105105
foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } });
106106
>foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void
107-
>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) => void
107+
>foo2 : ({ name, skills: { primary, secondary } }: Robot) => void
108108
>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; }
109109
>name : string
110110
>"Edger" : "Edger"

tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "no
3434
>"none" : "none"
3535

3636
function foo1(
37-
>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }?: Robot) => void
37+
>foo1 : ({ skills: { primary, secondary } }?: Robot) => void
3838
{
3939
skills: {
4040
>skills : any
@@ -67,7 +67,7 @@ function foo1(
6767
>primaryA : string
6868
}
6969
function foo2(
70-
>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }?: Robot) => void
70+
>foo2 : ({ name, skills: { primary, secondary } }?: Robot) => void
7171
{
7272
name: nameC = "name",
7373
>name : any
@@ -126,12 +126,12 @@ function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Ro
126126

127127
foo1(robotA);
128128
>foo1(robotA) : void
129-
>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }?: Robot) => void
129+
>foo1 : ({ skills: { primary, secondary } }?: Robot) => void
130130
>robotA : Robot
131131

132132
foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } });
133133
>foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void
134-
>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }?: Robot) => void
134+
>foo1 : ({ skills: { primary, secondary } }?: Robot) => void
135135
>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; }
136136
>name : string
137137
>"Edger" : "Edger"
@@ -144,12 +144,12 @@ foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming"
144144

145145
foo2(robotA);
146146
>foo2(robotA) : void
147-
>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }?: Robot) => void
147+
>foo2 : ({ name, skills: { primary, secondary } }?: Robot) => void
148148
>robotA : Robot
149149

150150
foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } });
151151
>foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void
152-
>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }?: Robot) => void
152+
>foo2 : ({ name, skills: { primary, secondary } }?: Robot) => void
153153
>{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; }
154154
>name : string
155155
>"Edger" : "Edger"

tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var robotA: Robot = { name: "mower", skill: "mowing" };
2626
>"mowing" : "mowing"
2727

2828
function foo1({ name: nameA }: Robot) {
29-
>foo1 : ({ name: nameA }: Robot) => void
29+
>foo1 : ({ name }: Robot) => void
3030
>name : any
3131
>nameA : string
3232

@@ -38,7 +38,7 @@ function foo1({ name: nameA }: Robot) {
3838
>nameA : string
3939
}
4040
function foo2({ name: nameB, skill: skillB }: Robot) {
41-
>foo2 : ({ name: nameB, skill: skillB }: Robot) => void
41+
>foo2 : ({ name, skill }: Robot) => void
4242
>name : any
4343
>nameB : string
4444
>skill : any
@@ -65,12 +65,12 @@ function foo3({ name }: Robot) {
6565

6666
foo1(robotA);
6767
>foo1(robotA) : void
68-
>foo1 : ({ name: nameA }: Robot) => void
68+
>foo1 : ({ name }: Robot) => void
6969
>robotA : Robot
7070

7171
foo1({ name: "Edger", skill: "cutting edges" });
7272
>foo1({ name: "Edger", skill: "cutting edges" }) : void
73-
>foo1 : ({ name: nameA }: Robot) => void
73+
>foo1 : ({ name }: Robot) => void
7474
>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; }
7575
>name : string
7676
>"Edger" : "Edger"
@@ -79,12 +79,12 @@ foo1({ name: "Edger", skill: "cutting edges" });
7979

8080
foo2(robotA);
8181
>foo2(robotA) : void
82-
>foo2 : ({ name: nameB, skill: skillB }: Robot) => void
82+
>foo2 : ({ name, skill }: Robot) => void
8383
>robotA : Robot
8484

8585
foo2({ name: "Edger", skill: "cutting edges" });
8686
>foo2({ name: "Edger", skill: "cutting edges" }) : void
87-
>foo2 : ({ name: nameB, skill: skillB }: Robot) => void
87+
>foo2 : ({ name, skill }: Robot) => void
8888
>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; }
8989
>name : string
9090
>"Edger" : "Edger"

tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var robotA: Robot = { name: "mower", skill: "mowing" };
2626
>"mowing" : "mowing"
2727

2828
function foo1({ name: nameA = "<NoName>" }: Robot = { }) {
29-
>foo1 : ({ name: nameA }?: Robot) => void
29+
>foo1 : ({ name }?: Robot) => void
3030
>name : any
3131
>nameA : string
3232
>"<NoName>" : "<NoName>"
@@ -40,7 +40,7 @@ function foo1({ name: nameA = "<NoName>" }: Robot = { }) {
4040
>nameA : string
4141
}
4242
function foo2({ name: nameB = "<NoName>", skill: skillB = "noSkill" }: Robot = {}) {
43-
>foo2 : ({ name: nameB, skill: skillB }?: Robot) => void
43+
>foo2 : ({ name, skill }?: Robot) => void
4444
>name : any
4545
>nameB : string
4646
>"<NoName>" : "<NoName>"
@@ -72,12 +72,12 @@ function foo3({ name = "<NoName>" }: Robot = {}) {
7272

7373
foo1(robotA);
7474
>foo1(robotA) : void
75-
>foo1 : ({ name: nameA }?: Robot) => void
75+
>foo1 : ({ name }?: Robot) => void
7676
>robotA : Robot
7777

7878
foo1({ name: "Edger", skill: "cutting edges" });
7979
>foo1({ name: "Edger", skill: "cutting edges" }) : void
80-
>foo1 : ({ name: nameA }?: Robot) => void
80+
>foo1 : ({ name }?: Robot) => void
8181
>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; }
8282
>name : string
8383
>"Edger" : "Edger"
@@ -86,12 +86,12 @@ foo1({ name: "Edger", skill: "cutting edges" });
8686

8787
foo2(robotA);
8888
>foo2(robotA) : void
89-
>foo2 : ({ name: nameB, skill: skillB }?: Robot) => void
89+
>foo2 : ({ name, skill }?: Robot) => void
9090
>robotA : Robot
9191

9292
foo2({ name: "Edger", skill: "cutting edges" });
9393
>foo2({ name: "Edger", skill: "cutting edges" }) : void
94-
>foo2 : ({ name: nameB, skill: skillB }?: Robot) => void
94+
>foo2 : ({ name, skill }?: Robot) => void
9595
>{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; }
9696
>name : string
9797
>"Edger" : "Edger"

tests/baselines/reference/syntheticDefaultExportsWithDynamicImports.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import("package").then(({default: foo}) => foo(42));
1313
>import("package") : Promise<{ default: (x: number) => string; }>
1414
>"package" : "package"
1515
>then : <TResult1 = { default: (x: number) => string; }, TResult2 = never>(onfulfilled?: (value: { default: (x: number) => string; }) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
16-
>({default: foo}) => foo(42) : ({ default: foo }: { default: (x: number) => string; }) => string
16+
>({default: foo}) => foo(42) : ({ default }: { default: (x: number) => string; }) => string
1717
>default : any
1818
>foo : (x: number) => string
1919
>foo(42) : string

0 commit comments

Comments
 (0)