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

0 commit comments

Comments
 (0)