diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index e00d46fe94e..aef1a61e080 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1064,7 +1064,7 @@ namespace ts { } else { write("{"); - emitList(node, elements, getEmitFlags(node) & EmitFlags.SingleLine ? ListFormat.ObjectBindingPatternElements : ListFormat.ObjectBindingPatternElementsWithSpaceBetweenBraces); + emitList(node, elements, ListFormat.ObjectBindingPatternElements); write("}"); } } @@ -3019,8 +3019,7 @@ namespace ts { TupleTypeElements = CommaDelimited | SpaceBetweenSiblings | SingleLine | Indented, UnionTypeConstituents = BarDelimited | SpaceBetweenSiblings | SingleLine, IntersectionTypeConstituents = AmpersandDelimited | SpaceBetweenSiblings | SingleLine, - ObjectBindingPatternElements = SingleLine | CommaDelimited | SpaceBetweenSiblings, - ObjectBindingPatternElementsWithSpaceBetweenBraces = SingleLine | AllowTrailingComma | SpaceBetweenBraces | CommaDelimited | SpaceBetweenSiblings, + ObjectBindingPatternElements = SingleLine | AllowTrailingComma | SpaceBetweenBraces | CommaDelimited | SpaceBetweenSiblings, ArrayBindingPatternElements = SingleLine | AllowTrailingComma | CommaDelimited | SpaceBetweenSiblings, ObjectLiteralExpressionProperties = PreserveLines | CommaDelimited | SpaceBetweenSiblings | SpaceBetweenBraces | Indented | Braces, ArrayLiteralExpressionElements = PreserveLines | CommaDelimited | SpaceBetweenSiblings | AllowTrailingComma | Indented | SquareBrackets, diff --git a/tests/baselines/reference/arrowFunctionExpressions.types b/tests/baselines/reference/arrowFunctionExpressions.types index aad43240daa..0de6c674d18 100644 --- a/tests/baselines/reference/arrowFunctionExpressions.types +++ b/tests/baselines/reference/arrowFunctionExpressions.types @@ -83,25 +83,25 @@ var p5 = ([a = 1]) => { }; >1 : 1 var p6 = ({ a }) => { }; ->p6 : ({a}: { a: any; }) => void ->({ a }) => { } : ({a}: { a: any; }) => void +>p6 : ({ a }: { a: any; }) => void +>({ a }) => { } : ({ a }: { a: any; }) => void >a : any var p7 = ({ a: { b } }) => { }; ->p7 : ({a: {b}}: { a: { b: any; }; }) => void ->({ a: { b } }) => { } : ({a: {b}}: { a: { b: any; }; }) => void +>p7 : ({ a: { b } }: { a: { b: any; }; }) => void +>({ a: { b } }) => { } : ({ a: { b } }: { a: { b: any; }; }) => void >a : any >b : any var p8 = ({ a = 1 }) => { }; ->p8 : ({a}: { a?: number; }) => void ->({ a = 1 }) => { } : ({a}: { a?: number; }) => void +>p8 : ({ a }: { a?: number; }) => void +>({ a = 1 }) => { } : ({ a }: { a?: number; }) => void >a : number >1 : 1 var p9 = ({ a: { b = 1 } = { b: 1 } }) => { }; ->p9 : ({a: {b}}: { a?: { b?: number; }; }) => void ->({ a: { b = 1 } = { b: 1 } }) => { } : ({a: {b}}: { a?: { b?: number; }; }) => void +>p9 : ({ a: { b } }: { a?: { b?: number; }; }) => void +>({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b } }: { a?: { b?: number; }; }) => void >a : any >b : number >1 : 1 @@ -110,8 +110,8 @@ var p9 = ({ a: { b = 1 } = { b: 1 } }) => { }; >1 : 1 var p10 = ([{ value, done }]) => { }; ->p10 : ([{value, done}]: [{ value: any; done: any; }]) => void ->([{ value, done }]) => { } : ([{value, done}]: [{ value: any; done: any; }]) => void +>p10 : ([{ value, done }]: [{ value: any; done: any; }]) => void +>([{ value, done }]) => { } : ([{ value, done }]: [{ value: any; done: any; }]) => void >value : any >done : any diff --git a/tests/baselines/reference/contextuallyTypedBindingInitializer.types b/tests/baselines/reference/contextuallyTypedBindingInitializer.types index e9624b156c7..4efd22a4c84 100644 --- a/tests/baselines/reference/contextuallyTypedBindingInitializer.types +++ b/tests/baselines/reference/contextuallyTypedBindingInitializer.types @@ -7,7 +7,7 @@ interface Show { >x : number } function f({ show = v => v.toString() }: Show) {} ->f : ({show}: Show) => void +>f : ({ show }: Show) => void >show : (x: number) => string >v => v.toString() : (v: number) => string >v : number @@ -18,7 +18,7 @@ function f({ show = v => v.toString() }: Show) {} >Show : Show function f2({ "show": showRename = v => v.toString() }: Show) {} ->f2 : ({"show": showRename}: Show) => void +>f2 : ({ "show": showRename }: Show) => void >showRename : (x: number) => string >v => v.toString() : (v: number) => string >v : number @@ -29,7 +29,7 @@ function f2({ "show": showRename = v => v.toString() }: Show) {} >Show : Show function f3({ ["show"]: showRename = v => v.toString() }: Show) {} ->f3 : ({["show"]: showRename}: Show) => void +>f3 : ({ ["show"]: showRename }: Show) => void >"show" : "show" >showRename : (x: number) => string >v => v.toString() : (v: number) => string @@ -48,7 +48,7 @@ interface Nested { >Show : Show } function ff({ nested = { show: v => v.toString() } }: Nested) {} ->ff : ({nested}: Nested) => void +>ff : ({ nested }: Nested) => void >nested : Show >{ show: v => v.toString() } : { show: (v: number) => string; } >show : (v: number) => string @@ -67,7 +67,7 @@ interface Tuples { >prop : [string, number] } function g({ prop = ["hello", 1234] }: Tuples) {} ->g : ({prop}: Tuples) => void +>g : ({ prop }: Tuples) => void >prop : [string, number] >["hello", 1234] : [string, number] >"hello" : "hello" @@ -81,7 +81,7 @@ interface StringUnion { >prop : "foo" | "bar" } function h({ prop = "foo" }: StringUnion) {} ->h : ({prop}: StringUnion) => void +>h : ({ prop }: StringUnion) => void >prop : "foo" | "bar" >"foo" : "foo" >StringUnion : StringUnion diff --git a/tests/baselines/reference/contextuallyTypedBindingInitializerNegative.types b/tests/baselines/reference/contextuallyTypedBindingInitializerNegative.types index 5adc82c3e62..1548e626e6d 100644 --- a/tests/baselines/reference/contextuallyTypedBindingInitializerNegative.types +++ b/tests/baselines/reference/contextuallyTypedBindingInitializerNegative.types @@ -7,7 +7,7 @@ interface Show { >x : number } function f({ show: showRename = v => v }: Show) {} ->f : ({show: showRename}: Show) => void +>f : ({ show: showRename }: Show) => void >show : any >showRename : ((x: number) => string) | ((v: number) => number) >v => v : (v: number) => number @@ -16,7 +16,7 @@ function f({ show: showRename = v => v }: Show) {} >Show : Show function f2({ "show": showRename = v => v }: Show) {} ->f2 : ({"show": showRename}: Show) => void +>f2 : ({ "show": showRename }: Show) => void >showRename : ((x: number) => string) | ((v: number) => number) >v => v : (v: number) => number >v : number @@ -24,7 +24,7 @@ function f2({ "show": showRename = v => v }: Show) {} >Show : Show function f3({ ["show"]: showRename = v => v }: Show) {} ->f3 : ({["show"]: showRename}: Show) => void +>f3 : ({ ["show"]: showRename }: Show) => void >"show" : "show" >showRename : ((x: number) => string) | ((v: number) => number) >v => v : (v: number) => number @@ -40,7 +40,7 @@ interface Nested { >Show : Show } function ff({ nested: nestedRename = { show: v => v } }: Nested) {} ->ff : ({nested: nestedRename}: Nested) => void +>ff : ({ nested: nestedRename }: Nested) => void >nested : any >nestedRename : Show | { show: (v: number) => number; } >{ show: v => v } : { show: (v: number) => number; } @@ -79,7 +79,7 @@ interface Tuples { >prop : [string, number] } function g({ prop = [101, 1234] }: Tuples) {} ->g : ({prop}: Tuples) => void +>g : ({ prop }: Tuples) => void >prop : [string, number] | [number, number] >[101, 1234] : [number, number] >101 : 101 @@ -93,7 +93,7 @@ interface StringUnion { >prop : "foo" | "bar" } function h({ prop = "baz" }: StringUnion) {} ->h : ({prop}: StringUnion) => void +>h : ({ prop }: StringUnion) => void >prop : "foo" | "bar" | "baz" >"baz" : "baz" >StringUnion : StringUnion diff --git a/tests/baselines/reference/contextuallyTypedIife.types b/tests/baselines/reference/contextuallyTypedIife.types index 04ddbf50fde..77bb40df903 100644 --- a/tests/baselines/reference/contextuallyTypedIife.types +++ b/tests/baselines/reference/contextuallyTypedIife.types @@ -175,8 +175,8 @@ // destructuring parameters (with defaults too!) (({ q }) => q)({ q : 13 }); >(({ q }) => q)({ q : 13 }) : number ->(({ q }) => q) : ({q}: { q: number; }) => number ->({ q }) => q : ({q}: { q: number; }) => number +>(({ q }) => q) : ({ q }: { q: number; }) => number +>({ q }) => q : ({ q }: { q: number; }) => number >q : number >q : number >{ q : 13 } : { q: number; } @@ -185,8 +185,8 @@ (({ p = 14 }) => p)({ p : 15 }); >(({ p = 14 }) => p)({ p : 15 }) : number ->(({ p = 14 }) => p) : ({p}: { p: number; }) => number ->({ p = 14 }) => p : ({p}: { p: number; }) => number +>(({ p = 14 }) => p) : ({ p }: { p: number; }) => number +>({ p = 14 }) => p : ({ p }: { p: number; }) => number >p : number >14 : 14 >p : number @@ -196,8 +196,8 @@ (({ r = 17 } = { r: 18 }) => r)({r : 19}); >(({ r = 17 } = { r: 18 }) => r)({r : 19}) : number ->(({ r = 17 } = { r: 18 }) => r) : ({r}?: { r: number; }) => number ->({ r = 17 } = { r: 18 }) => r : ({r}?: { r: number; }) => number +>(({ r = 17 } = { r: 18 }) => r) : ({ r }?: { r: number; }) => number +>({ r = 17 } = { r: 18 }) => r : ({ r }?: { r: number; }) => number >r : number >17 : 17 >{ r: 18 } : { r: number; } @@ -210,8 +210,8 @@ (({ u = 22 } = { u: 23 }) => u)(); >(({ u = 22 } = { u: 23 }) => u)() : number ->(({ u = 22 } = { u: 23 }) => u) : ({u}?: { u?: number; }) => number ->({ u = 22 } = { u: 23 }) => u : ({u}?: { u?: number; }) => number +>(({ u = 22 } = { u: 23 }) => u) : ({ u }?: { u?: number; }) => number +>({ u = 22 } = { u: 23 }) => u : ({ u }?: { u?: number; }) => number >u : number >22 : 22 >{ u: 23 } : { u?: number; } diff --git a/tests/baselines/reference/controlFlowDestructuringParameters.types b/tests/baselines/reference/controlFlowDestructuringParameters.types index 7fdb1eded01..44755dca81b 100644 --- a/tests/baselines/reference/controlFlowDestructuringParameters.types +++ b/tests/baselines/reference/controlFlowDestructuringParameters.types @@ -12,7 +12,7 @@ >map : { (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): U[]; (callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): U[]; } ({ x }) => x ->({ x }) => x : (this: void, {x}: { x: number; }) => number +>({ x }) => x : (this: void, { x }: { x: number; }) => number >x : number >x : number diff --git a/tests/baselines/reference/declarationEmitBindingPatterns.types b/tests/baselines/reference/declarationEmitBindingPatterns.types index 1a47fbebf07..d49893dad94 100644 --- a/tests/baselines/reference/declarationEmitBindingPatterns.types +++ b/tests/baselines/reference/declarationEmitBindingPatterns.types @@ -1,7 +1,7 @@ === tests/cases/compiler/declarationEmitBindingPatterns.ts === const k = ({x: z = 'y'}) => { } ->k : ({x: z}: { x?: string; }) => void ->({x: z = 'y'}) => { } : ({x: z}: { x?: string; }) => void +>k : ({ x: z }: { x?: string; }) => void +>({x: z = 'y'}) => { } : ({ x: z }: { x?: string; }) => void >x : any >z : string >'y' : "y" @@ -10,7 +10,7 @@ var a; >a : any function f({} = a, [] = a, { p: {} = a} = a) { ->f : ({}?: any, []?: any, {p: {}}?: any) => void +>f : ({}?: any, []?: any, { p: {} }?: any) => void >a : any >a : any >p : any diff --git a/tests/baselines/reference/declarationEmitDestructuring1.types b/tests/baselines/reference/declarationEmitDestructuring1.types index abba67981d8..161ad94e54a 100644 --- a/tests/baselines/reference/declarationEmitDestructuring1.types +++ b/tests/baselines/reference/declarationEmitDestructuring1.types @@ -12,7 +12,7 @@ function far([a, [b], [[c]]]: [number, boolean[], string[][]]): void { } >c : string function bar({a1, b1, c1}: { a1: number, b1: boolean, c1: string }): void { } ->bar : ({a1, b1, c1}: { a1: number; b1: boolean; c1: string; }) => void +>bar : ({ a1, b1, c1 }: { a1: number; b1: boolean; c1: string; }) => void >a1 : number >b1 : boolean >c1 : string @@ -21,7 +21,7 @@ function bar({a1, b1, c1}: { a1: number, b1: boolean, c1: string }): void { } >c1 : string function baz({a2, b2: {b1, c1}}: { a2: number, b2: { b1: boolean, c1: string } }): void { } ->baz : ({a2, b2: {b1, c1}}: { a2: number; b2: { b1: boolean; c1: string; }; }) => void +>baz : ({ a2, b2: { b1, c1 } }: { a2: number; b2: { b1: boolean; c1: string; }; }) => void >a2 : number >b2 : any >b1 : boolean diff --git a/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.types b/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.types index 0bf290bcf7d..fb8c57d019b 100644 --- a/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.types +++ b/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.types @@ -11,7 +11,7 @@ function foo(...rest: any[]) { } function foo2( { x, y, z }?: { x: string; y: number; z: boolean }); ->foo2 : ({x, y, z}?: { x: string; y: number; z: boolean; }) => any +>foo2 : ({ x, y, z }?: { x: string; y: number; z: boolean; }) => any >x : string >y : number >z : boolean @@ -20,7 +20,7 @@ function foo2( { x, y, z }?: { x: string; y: number; z: boolean }); >z : boolean function foo2(...rest: any[]) { ->foo2 : ({x, y, z}?: { x: string; y: number; z: boolean; }) => any +>foo2 : ({ x, y, z }?: { x: string; y: number; z: boolean; }) => any >rest : any[] } diff --git a/tests/baselines/reference/destructureOptionalParameter.types b/tests/baselines/reference/destructureOptionalParameter.types index f007a992c9e..18a6d7675dd 100644 --- a/tests/baselines/reference/destructureOptionalParameter.types +++ b/tests/baselines/reference/destructureOptionalParameter.types @@ -1,13 +1,13 @@ === tests/cases/compiler/destructureOptionalParameter.ts === declare function f1({ a, b }?: { a: number, b: string }): void; ->f1 : ({a, b}?: { a: number; b: string; } | undefined) => void +>f1 : ({ a, b }?: { a: number; b: string; } | undefined) => void >a : number >b : string >a : number >b : string function f2({ a, b }: { a: number, b: number } = { a: 0, b: 0 }) { ->f2 : ({a, b}?: { a: number; b: number; }) => void +>f2 : ({ a, b }?: { a: number; b: number; }) => void >a : number >b : number >a : number diff --git a/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt index d76a4efe5f1..81c85f7c42b 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt @@ -38,7 +38,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts( tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(47,13): error TS2463: A binding pattern parameter cannot be optional in an implementation signature. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(55,7): error TS2420: Class 'C4' incorrectly implements interface 'F2'. Types of property 'd4' are incompatible. - Type '({x, y, c}: { x: any; y: any; c: any; }) => void' is not assignable to type '({x, y, z}?: { x: any; y: any; z: any; }) => any'. + Type '({ x, y, c }: { x: any; y: any; c: any; }) => void' is not assignable to type '({ x, y, z }?: { x: any; y: any; z: any; }) => any'. Types of parameters '__0' and '__0' are incompatible. Type '{ x: any; y: any; z: any; }' is not assignable to type '{ x: any; y: any; c: any; }'. Property 'c' is missing in type '{ x: any; y: any; z: any; }'. @@ -162,7 +162,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts( ~~ !!! error TS2420: Class 'C4' incorrectly implements interface 'F2'. !!! error TS2420: Types of property 'd4' are incompatible. -!!! error TS2420: Type '({x, y, c}: { x: any; y: any; c: any; }) => void' is not assignable to type '({x, y, z}?: { x: any; y: any; z: any; }) => any'. +!!! error TS2420: Type '({ x, y, c }: { x: any; y: any; c: any; }) => void' is not assignable to type '({ x, y, z }?: { x: any; y: any; z: any; }) => any'. !!! error TS2420: Types of parameters '__0' and '__0' are incompatible. !!! error TS2420: Type '{ x: any; y: any; z: any; }' is not assignable to type '{ x: any; y: any; c: any; }'. !!! error TS2420: Property 'c' is missing in type '{ x: any; y: any; z: any; }'. diff --git a/tests/baselines/reference/destructuringParameterDeclaration7ES5.types b/tests/baselines/reference/destructuringParameterDeclaration7ES5.types index 502a176596a..40a07f02276 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration7ES5.types +++ b/tests/baselines/reference/destructuringParameterDeclaration7ES5.types @@ -10,13 +10,13 @@ interface ISomething { } function foo({}, {foo, bar}: ISomething) {} ->foo : ({}: {}, {foo, bar}: ISomething) => void +>foo : ({}: {}, { foo, bar }: ISomething) => void >foo : string >bar : string >ISomething : ISomething function baz([], {foo, bar}: ISomething) {} ->baz : ([]: any[], {foo, bar}: ISomething) => void +>baz : ([]: any[], { foo, bar }: ISomething) => void >foo : string >bar : string >ISomething : ISomething diff --git a/tests/baselines/reference/destructuringParameterDeclaration7ES5iterable.types b/tests/baselines/reference/destructuringParameterDeclaration7ES5iterable.types index 542407cabe2..607c34cdd37 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration7ES5iterable.types +++ b/tests/baselines/reference/destructuringParameterDeclaration7ES5iterable.types @@ -10,13 +10,13 @@ interface ISomething { } function foo({}, {foo, bar}: ISomething) {} ->foo : ({}: {}, {foo, bar}: ISomething) => void +>foo : ({}: {}, { foo, bar }: ISomething) => void >foo : string >bar : string >ISomething : ISomething function baz([], {foo, bar}: ISomething) {} ->baz : ([]: any[], {foo, bar}: ISomething) => void +>baz : ([]: any[], { foo, bar }: ISomething) => void >foo : string >bar : string >ISomething : ISomething diff --git a/tests/baselines/reference/destructuringWithGenericParameter.types b/tests/baselines/reference/destructuringWithGenericParameter.types index 07a86e679a9..430d6e0faca 100644 --- a/tests/baselines/reference/destructuringWithGenericParameter.types +++ b/tests/baselines/reference/destructuringWithGenericParameter.types @@ -36,7 +36,7 @@ genericFunction(genericObject, ({greeting}) => { >genericFunction(genericObject, ({greeting}) => { var s = greeting.toLocaleLowerCase(); // Greeting should be of type string}) : void >genericFunction : (object: GenericClass, callback: (payload: T) => void) => void >genericObject : GenericClass<{ greeting: string; }> ->({greeting}) => { var s = greeting.toLocaleLowerCase(); // Greeting should be of type string} : ({greeting}: { greeting: string; }) => void +>({greeting}) => { var s = greeting.toLocaleLowerCase(); // Greeting should be of type string} : ({ greeting }: { greeting: string; }) => void >greeting : string var s = greeting.toLocaleLowerCase(); // Greeting should be of type string diff --git a/tests/baselines/reference/destructuringWithLiteralInitializers.types b/tests/baselines/reference/destructuringWithLiteralInitializers.types index 43391515014..51c432f7605 100644 --- a/tests/baselines/reference/destructuringWithLiteralInitializers.types +++ b/tests/baselines/reference/destructuringWithLiteralInitializers.types @@ -1,13 +1,13 @@ === tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers.ts === // (arg: { x: any, y: any }) => void function f1({ x, y }) { } ->f1 : ({x, y}: { x: any; y: any; }) => void +>f1 : ({ x, y }: { x: any; y: any; }) => void >x : any >y : any f1({ x: 1, y: 1 }); >f1({ x: 1, y: 1 }) : void ->f1 : ({x, y}: { x: any; y: any; }) => void +>f1 : ({ x, y }: { x: any; y: any; }) => void >{ x: 1, y: 1 } : { x: number; y: number; } >x : number >1 : 1 @@ -16,21 +16,21 @@ f1({ x: 1, y: 1 }); // (arg: { x: any, y?: number }) => void function f2({ x, y = 0 }) { } ->f2 : ({x, y}: { x: any; y?: number; }) => void +>f2 : ({ x, y }: { x: any; y?: number; }) => void >x : any >y : number >0 : 0 f2({ x: 1 }); >f2({ x: 1 }) : void ->f2 : ({x, y}: { x: any; y?: number; }) => void +>f2 : ({ x, y }: { x: any; y?: number; }) => void >{ x: 1 } : { x: number; } >x : number >1 : 1 f2({ x: 1, y: 1 }); >f2({ x: 1, y: 1 }) : void ->f2 : ({x, y}: { x: any; y?: number; }) => void +>f2 : ({ x, y }: { x: any; y?: number; }) => void >{ x: 1, y: 1 } : { x: number; y: number; } >x : number >1 : 1 @@ -39,7 +39,7 @@ f2({ x: 1, y: 1 }); // (arg: { x?: number, y?: number }) => void function f3({ x = 0, y = 0 }) { } ->f3 : ({x, y}: { x?: number; y?: number; }) => void +>f3 : ({ x, y }: { x?: number; y?: number; }) => void >x : number >0 : 0 >y : number @@ -47,26 +47,26 @@ function f3({ x = 0, y = 0 }) { } f3({}); >f3({}) : void ->f3 : ({x, y}: { x?: number; y?: number; }) => void +>f3 : ({ x, y }: { x?: number; y?: number; }) => void >{} : {} f3({ x: 1 }); >f3({ x: 1 }) : void ->f3 : ({x, y}: { x?: number; y?: number; }) => void +>f3 : ({ x, y }: { x?: number; y?: number; }) => void >{ x: 1 } : { x: number; } >x : number >1 : 1 f3({ y: 1 }); >f3({ y: 1 }) : void ->f3 : ({x, y}: { x?: number; y?: number; }) => void +>f3 : ({ x, y }: { x?: number; y?: number; }) => void >{ y: 1 } : { y: number; } >y : number >1 : 1 f3({ x: 1, y: 1 }); >f3({ x: 1, y: 1 }) : void ->f3 : ({x, y}: { x?: number; y?: number; }) => void +>f3 : ({ x, y }: { x?: number; y?: number; }) => void >{ x: 1, y: 1 } : { x: number; y: number; } >x : number >1 : 1 @@ -75,7 +75,7 @@ f3({ x: 1, y: 1 }); // (arg?: { x: number, y: number }) => void function f4({ x, y } = { x: 0, y: 0 }) { } ->f4 : ({x, y}?: { x: number; y: number; }) => void +>f4 : ({ x, y }?: { x: number; y: number; }) => void >x : number >y : number >{ x: 0, y: 0 } : { x: number; y: number; } @@ -86,11 +86,11 @@ function f4({ x, y } = { x: 0, y: 0 }) { } f4(); >f4() : void ->f4 : ({x, y}?: { x: number; y: number; }) => void +>f4 : ({ x, y }?: { x: number; y: number; }) => void f4({ x: 1, y: 1 }); >f4({ x: 1, y: 1 }) : void ->f4 : ({x, y}?: { x: number; y: number; }) => void +>f4 : ({ x, y }?: { x: number; y: number; }) => void >{ x: 1, y: 1 } : { x: number; y: number; } >x : number >1 : 1 @@ -99,7 +99,7 @@ f4({ x: 1, y: 1 }); // (arg?: { x: number, y?: number }) => void function f5({ x, y = 0 } = { x: 0 }) { } ->f5 : ({x, y}?: { x: number; y?: number; }) => void +>f5 : ({ x, y }?: { x: number; y?: number; }) => void >x : number >y : number >0 : 0 @@ -109,18 +109,18 @@ function f5({ x, y = 0 } = { x: 0 }) { } f5(); >f5() : void ->f5 : ({x, y}?: { x: number; y?: number; }) => void +>f5 : ({ x, y }?: { x: number; y?: number; }) => void f5({ x: 1 }); >f5({ x: 1 }) : void ->f5 : ({x, y}?: { x: number; y?: number; }) => void +>f5 : ({ x, y }?: { x: number; y?: number; }) => void >{ x: 1 } : { x: number; } >x : number >1 : 1 f5({ x: 1, y: 1 }); >f5({ x: 1, y: 1 }) : void ->f5 : ({x, y}?: { x: number; y?: number; }) => void +>f5 : ({ x, y }?: { x: number; y?: number; }) => void >{ x: 1, y: 1 } : { x: number; y: number; } >x : number >1 : 1 @@ -129,7 +129,7 @@ f5({ x: 1, y: 1 }); // (arg?: { x?: number, y?: number }) => void function f6({ x = 0, y = 0 } = {}) { } ->f6 : ({x, y}?: { x?: number; y?: number; }) => void +>f6 : ({ x, y }?: { x?: number; y?: number; }) => void >x : number >0 : 0 >y : number @@ -138,30 +138,30 @@ function f6({ x = 0, y = 0 } = {}) { } f6(); >f6() : void ->f6 : ({x, y}?: { x?: number; y?: number; }) => void +>f6 : ({ x, y }?: { x?: number; y?: number; }) => void f6({}); >f6({}) : void ->f6 : ({x, y}?: { x?: number; y?: number; }) => void +>f6 : ({ x, y }?: { x?: number; y?: number; }) => void >{} : {} f6({ x: 1 }); >f6({ x: 1 }) : void ->f6 : ({x, y}?: { x?: number; y?: number; }) => void +>f6 : ({ x, y }?: { x?: number; y?: number; }) => void >{ x: 1 } : { x: number; } >x : number >1 : 1 f6({ y: 1 }); >f6({ y: 1 }) : void ->f6 : ({x, y}?: { x?: number; y?: number; }) => void +>f6 : ({ x, y }?: { x?: number; y?: number; }) => void >{ y: 1 } : { y: number; } >y : number >1 : 1 f6({ x: 1, y: 1 }); >f6({ x: 1, y: 1 }) : void ->f6 : ({x, y}?: { x?: number; y?: number; }) => void +>f6 : ({ x, y }?: { x?: number; y?: number; }) => void >{ x: 1, y: 1 } : { x: number; y: number; } >x : number >1 : 1 @@ -170,7 +170,7 @@ f6({ x: 1, y: 1 }); // (arg?: { a: { x?: number, y?: number } }) => void function f7({ a: { x = 0, y = 0 } } = { a: {} }) { } ->f7 : ({a: {x, y}}?: { a: { x?: number; y?: number; }; }) => void +>f7 : ({ a: { x, y } }?: { a: { x?: number; y?: number; }; }) => void >a : any >x : number >0 : 0 @@ -182,18 +182,18 @@ function f7({ a: { x = 0, y = 0 } } = { a: {} }) { } f7(); >f7() : void ->f7 : ({a: {x, y}}?: { a: { x?: number; y?: number; }; }) => void +>f7 : ({ a: { x, y } }?: { a: { x?: number; y?: number; }; }) => void f7({ a: {} }); >f7({ a: {} }) : void ->f7 : ({a: {x, y}}?: { a: { x?: number; y?: number; }; }) => void +>f7 : ({ a: { x, y } }?: { a: { x?: number; y?: number; }; }) => void >{ a: {} } : { a: {}; } >a : {} >{} : {} f7({ a: { x: 1 } }); >f7({ a: { x: 1 } }) : void ->f7 : ({a: {x, y}}?: { a: { x?: number; y?: number; }; }) => void +>f7 : ({ a: { x, y } }?: { a: { x?: number; y?: number; }; }) => void >{ a: { x: 1 } } : { a: { x: number; }; } >a : { x: number; } >{ x: 1 } : { x: number; } @@ -202,7 +202,7 @@ f7({ a: { x: 1 } }); f7({ a: { y: 1 } }); >f7({ a: { y: 1 } }) : void ->f7 : ({a: {x, y}}?: { a: { x?: number; y?: number; }; }) => void +>f7 : ({ a: { x, y } }?: { a: { x?: number; y?: number; }; }) => void >{ a: { y: 1 } } : { a: { y: number; }; } >a : { y: number; } >{ y: 1 } : { y: number; } @@ -211,7 +211,7 @@ f7({ a: { y: 1 } }); f7({ a: { x: 1, y: 1 } }); >f7({ a: { x: 1, y: 1 } }) : void ->f7 : ({a: {x, y}}?: { a: { x?: number; y?: number; }; }) => void +>f7 : ({ a: { x, y } }?: { a: { x?: number; y?: number; }; }) => void >{ a: { x: 1, y: 1 } } : { a: { x: number; y: number; }; } >a : { x: number; y: number; } >{ x: 1, y: 1 } : { x: number; y: number; } diff --git a/tests/baselines/reference/emitArrowFunctionES6.types b/tests/baselines/reference/emitArrowFunctionES6.types index c434e4b285a..314d5e464b7 100644 --- a/tests/baselines/reference/emitArrowFunctionES6.types +++ b/tests/baselines/reference/emitArrowFunctionES6.types @@ -70,25 +70,25 @@ var p5 = ([a = 1]) => { }; >1 : 1 var p6 = ({ a }) => { }; ->p6 : ({a}: { a: any; }) => void ->({ a }) => { } : ({a}: { a: any; }) => void +>p6 : ({ a }: { a: any; }) => void +>({ a }) => { } : ({ a }: { a: any; }) => void >a : any var p7 = ({ a: { b } }) => { }; ->p7 : ({a: {b}}: { a: { b: any; }; }) => void ->({ a: { b } }) => { } : ({a: {b}}: { a: { b: any; }; }) => void +>p7 : ({ a: { b } }: { a: { b: any; }; }) => void +>({ a: { b } }) => { } : ({ a: { b } }: { a: { b: any; }; }) => void >a : any >b : any var p8 = ({ a = 1 }) => { }; ->p8 : ({a}: { a?: number; }) => void ->({ a = 1 }) => { } : ({a}: { a?: number; }) => void +>p8 : ({ a }: { a?: number; }) => void +>({ a = 1 }) => { } : ({ a }: { a?: number; }) => void >a : number >1 : 1 var p9 = ({ a: { b = 1 } = { b: 1 } }) => { }; ->p9 : ({a: {b}}: { a?: { b?: number; }; }) => void ->({ a: { b = 1 } = { b: 1 } }) => { } : ({a: {b}}: { a?: { b?: number; }; }) => void +>p9 : ({ a: { b } }: { a?: { b?: number; }; }) => void +>({ a: { b = 1 } = { b: 1 } }) => { } : ({ a: { b } }: { a?: { b?: number; }; }) => void >a : any >b : number >1 : 1 @@ -97,8 +97,8 @@ var p9 = ({ a: { b = 1 } = { b: 1 } }) => { }; >1 : 1 var p10 = ([{ value, done }]) => { }; ->p10 : ([{value, done}]: [{ value: any; done: any; }]) => void ->([{ value, done }]) => { } : ([{value, done}]: [{ value: any; done: any; }]) => void +>p10 : ([{ value, done }]: [{ value: any; done: any; }]) => void +>([{ value, done }]) => { } : ([{ value, done }]: [{ value: any; done: any; }]) => void >value : any >done : any diff --git a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES5.types b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES5.types index c61c80c5b3d..7db78f29829 100644 --- a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES5.types +++ b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES5.types @@ -61,7 +61,7 @@ } function f({} = a, [] = a, { p: {} = a} = a) { ->f : ({}?: any, []?: any, {p: {}}?: any) => ({}?: any, []?: any, {p: {}}?: any) => any +>f : ({}?: any, []?: any, { p: {} }?: any) => ({}?: any, []?: any, { p: {} }?: any) => any >a : any >a : any >p : any @@ -69,7 +69,7 @@ >a : any return ({} = a, [] = a, { p: {} = a } = a) => a; ->({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, {p: {}}?: any) => any +>({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} }?: any) => any >a : any >a : any >p : any diff --git a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES5iterable.types b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES5iterable.types index 9c623fd8879..d5559047aba 100644 --- a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES5iterable.types +++ b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES5iterable.types @@ -61,7 +61,7 @@ } function f({} = a, [] = a, { p: {} = a} = a) { ->f : ({}?: any, []?: any, {p: {}}?: any) => ({}?: any, []?: any, {p: {}}?: any) => any +>f : ({}?: any, []?: any, { p: {} }?: any) => ({}?: any, []?: any, { p: {} }?: any) => any >a : any >a : any >p : any @@ -69,7 +69,7 @@ >a : any return ({} = a, [] = a, { p: {} = a } = a) => a; ->({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, {p: {}}?: any) => any +>({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} }?: any) => any >a : any >a : any >p : any diff --git a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES6.types b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES6.types index 48d5f40b971..535562296a3 100644 --- a/tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES6.types +++ b/tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES6.types @@ -61,7 +61,7 @@ } function f({} = a, [] = a, { p: {} = a} = a) { ->f : ({}?: any, []?: any, {p: {}}?: any) => ({}?: any, []?: any, {p: {}}?: any) => any +>f : ({}?: any, []?: any, { p: {} }?: any) => ({}?: any, []?: any, { p: {} }?: any) => any >a : any >a : any >p : any @@ -69,7 +69,7 @@ >a : any return ({} = a, [] = a, { p: {} = a } = a) => a; ->({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, {p: {}}?: any) => any +>({} = a, [] = a, { p: {} = a } = a) => a : ({}?: any, []?: any, { p: {} }?: any) => any >a : any >a : any >p : any diff --git a/tests/baselines/reference/fallbackToBindingPatternForTypeInference.types b/tests/baselines/reference/fallbackToBindingPatternForTypeInference.types index 7b1a2d8e6ff..161870de77c 100644 --- a/tests/baselines/reference/fallbackToBindingPatternForTypeInference.types +++ b/tests/baselines/reference/fallbackToBindingPatternForTypeInference.types @@ -9,7 +9,7 @@ declare function trans(f: (x: T) => string): number; trans(({a}) => a); >trans(({a}) => a) : number >trans : (f: (x: T) => string) => number ->({a}) => a : ({a}: { a: any; }) => any +>({a}) => a : ({ a }: { a: any; }) => any >a : any >a : any @@ -24,7 +24,7 @@ trans(([b,c]) => 'foo'); trans(({d: [e,f]}) => 'foo'); >trans(({d: [e,f]}) => 'foo') : number >trans : (f: (x: T) => string) => number ->({d: [e,f]}) => 'foo' : ({d: [e, f]}: { d: [any, any]; }) => string +>({d: [e,f]}) => 'foo' : ({ d: [e, f] }: { d: [any, any]; }) => string >d : any >e : any >f : any @@ -33,7 +33,7 @@ trans(({d: [e,f]}) => 'foo'); trans(([{g},{h}]) => 'foo'); >trans(([{g},{h}]) => 'foo') : number >trans : (f: (x: T) => string) => number ->([{g},{h}]) => 'foo' : ([{g}, {h}]: [{ g: any; }, { h: any; }]) => string +>([{g},{h}]) => 'foo' : ([{ g }, { h }]: [{ g: any; }, { h: any; }]) => string >g : any >h : any >'foo' : "foo" @@ -41,7 +41,7 @@ trans(([{g},{h}]) => 'foo'); trans(({a, b = 10}) => a); >trans(({a, b = 10}) => a) : number >trans : (f: (x: T) => string) => number ->({a, b = 10}) => a : ({a, b}: { a: any; b?: number; }) => any +>({a, b = 10}) => a : ({ a, b }: { a: any; b?: number; }) => any >a : any >b : number >10 : 10 diff --git a/tests/baselines/reference/noImplicitAnyDestructuringInPrivateMethod.types b/tests/baselines/reference/noImplicitAnyDestructuringInPrivateMethod.types index a399e59e3c3..eb16207afed 100644 --- a/tests/baselines/reference/noImplicitAnyDestructuringInPrivateMethod.types +++ b/tests/baselines/reference/noImplicitAnyDestructuringInPrivateMethod.types @@ -10,7 +10,7 @@ export class Bar { >Bar : Bar private bar({ a, }: Arg): number { ->bar : ({a}: { a: number; }) => number +>bar : ({ a, }: { a: number; }) => number >a : number >Arg : { a: number; } @@ -22,6 +22,6 @@ export declare class Bar2 { >Bar2 : Bar2 private bar({ a, }); ->bar : ({a}: { a: any; }) => any +>bar : ({ a, }: { a: any; }) => any >a : any } diff --git a/tests/baselines/reference/objectRest.types b/tests/baselines/reference/objectRest.types index 2fff9a3c729..dff8830e818 100644 --- a/tests/baselines/reference/objectRest.types +++ b/tests/baselines/reference/objectRest.types @@ -218,8 +218,8 @@ var { [computed]: stillNotGreat, [computed2]: soSo, ...o } = o; >o : { a: number; b: string; } var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes; ->noContextualType : ({aNumber, ...notEmptyObject}: { [x: string]: any; aNumber?: number; }) => any ->({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes : ({aNumber, ...notEmptyObject}: { [x: string]: any; aNumber?: number; }) => any +>noContextualType : ({ aNumber, ...notEmptyObject }: { [x: string]: any; aNumber?: number; }) => any +>({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmptyObject.anythingGoes : ({ aNumber, ...notEmptyObject }: { [x: string]: any; aNumber?: number; }) => any >aNumber : number >12 : 12 >notEmptyObject : { [x: string]: any; } diff --git a/tests/baselines/reference/objectRestParameter.types b/tests/baselines/reference/objectRestParameter.types index e56e7cebfc7..3d0d1bb619b 100644 --- a/tests/baselines/reference/objectRestParameter.types +++ b/tests/baselines/reference/objectRestParameter.types @@ -1,6 +1,6 @@ === tests/cases/conformance/types/rest/objectRestParameter.ts === function cloneAgain({ a, ...clone }: { a: number, b: string }): void { ->cloneAgain : ({a, ...clone}: { a: number; b: string; }) => void +>cloneAgain : ({ a, ...clone }: { a: number; b: string; }) => void >a : number >clone : { b: string; } >a : number @@ -19,7 +19,7 @@ declare function suddenly(f: (a: { x: { z, ka }, y: string }) => void); suddenly(({ x: a, ...rest }) => rest.y); >suddenly(({ x: a, ...rest }) => rest.y) : any >suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any ->({ x: a, ...rest }) => rest.y : ({x: a, ...rest}: { x: { z: any; ka: any; }; y: string; }) => string +>({ x: a, ...rest }) => rest.y : ({ x: a, ...rest }: { x: { z: any; ka: any; }; y: string; }) => string >x : any >a : { z: any; ka: any; } >rest : { y: string; } @@ -30,7 +30,7 @@ suddenly(({ x: a, ...rest }) => rest.y); suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka); >suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka) : any >suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any ->({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({x: {z, ...nested}, ...rest}?: { x: { z: any; ka: any; }; y: string; }) => string +>({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({ x: { z, ...nested }, ...rest }?: { x: { z: any; ka: any; }; y: string; }) => string >x : any >z : any >12 : 12 @@ -57,7 +57,7 @@ class C { >C : C m({ a, ...clone }: { a: number, b: string}): void { ->m : ({a, ...clone}: { a: number; b: string; }) => void +>m : ({ a, ...clone }: { a: number; b: string; }) => void >a : number >clone : { b: string; } >a : number @@ -76,7 +76,7 @@ class C { } } function foobar({ bar={}, ...opts }: any = {}) { ->foobar : ({bar, ...opts}?: any) => void +>foobar : ({ bar, ...opts }?: any) => void >bar : {} >{} : {} >opts : any @@ -84,18 +84,18 @@ function foobar({ bar={}, ...opts }: any = {}) { } foobar(); >foobar() : void ->foobar : ({bar, ...opts}?: any) => void +>foobar : ({ bar, ...opts }?: any) => void foobar({ baz: 'hello' }); >foobar({ baz: 'hello' }) : void ->foobar : ({bar, ...opts}?: any) => void +>foobar : ({ bar, ...opts }?: any) => void >{ baz: 'hello' } : { baz: string; } >baz : string >'hello' : "hello" foobar({ bar: { greeting: 'hello' } }); >foobar({ bar: { greeting: 'hello' } }) : void ->foobar : ({bar, ...opts}?: any) => void +>foobar : ({ bar, ...opts }?: any) => void >{ bar: { greeting: 'hello' } } : { bar: { greeting: string; }; } >bar : { greeting: string; } >{ greeting: 'hello' } : { greeting: string; } diff --git a/tests/baselines/reference/objectRestParameterES5.types b/tests/baselines/reference/objectRestParameterES5.types index 009d810782b..e0ebee39317 100644 --- a/tests/baselines/reference/objectRestParameterES5.types +++ b/tests/baselines/reference/objectRestParameterES5.types @@ -1,6 +1,6 @@ === tests/cases/conformance/types/rest/objectRestParameterES5.ts === function cloneAgain({ a, ...clone }: { a: number, b: string }): void { ->cloneAgain : ({a, ...clone}: { a: number; b: string; }) => void +>cloneAgain : ({ a, ...clone }: { a: number; b: string; }) => void >a : number >clone : { b: string; } >a : number @@ -19,7 +19,7 @@ declare function suddenly(f: (a: { x: { z, ka }, y: string }) => void); suddenly(({ x: a, ...rest }) => rest.y); >suddenly(({ x: a, ...rest }) => rest.y) : any >suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any ->({ x: a, ...rest }) => rest.y : ({x: a, ...rest}: { x: { z: any; ka: any; }; y: string; }) => string +>({ x: a, ...rest }) => rest.y : ({ x: a, ...rest }: { x: { z: any; ka: any; }; y: string; }) => string >x : any >a : { z: any; ka: any; } >rest : { y: string; } @@ -30,7 +30,7 @@ suddenly(({ x: a, ...rest }) => rest.y); suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka); >suddenly(({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka) : any >suddenly : (f: (a: { x: { z: any; ka: any; }; y: string; }) => void) => any ->({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({x: {z, ...nested}, ...rest}?: { x: { z: any; ka: any; }; y: string; }) => string +>({ x: { z = 12, ...nested }, ...rest } = { x: { z: 1, ka: 1 }, y: 'noo' }) => rest.y + nested.ka : ({ x: { z, ...nested }, ...rest }?: { x: { z: any; ka: any; }; y: string; }) => string >x : any >z : any >12 : 12 @@ -57,7 +57,7 @@ class C { >C : C m({ a, ...clone }: { a: number, b: string}): void { ->m : ({a, ...clone}: { a: number; b: string; }) => void +>m : ({ a, ...clone }: { a: number; b: string; }) => void >a : number >clone : { b: string; } >a : number @@ -76,7 +76,7 @@ class C { } } function foobar({ bar={}, ...opts }: any = {}) { ->foobar : ({bar, ...opts}?: any) => void +>foobar : ({ bar, ...opts }?: any) => void >bar : {} >{} : {} >opts : any @@ -84,18 +84,18 @@ function foobar({ bar={}, ...opts }: any = {}) { } foobar(); >foobar() : void ->foobar : ({bar, ...opts}?: any) => void +>foobar : ({ bar, ...opts }?: any) => void foobar({ baz: 'hello' }); >foobar({ baz: 'hello' }) : void ->foobar : ({bar, ...opts}?: any) => void +>foobar : ({ bar, ...opts }?: any) => void >{ baz: 'hello' } : { baz: string; } >baz : string >'hello' : "hello" foobar({ bar: { greeting: 'hello' } }); >foobar({ bar: { greeting: 'hello' } }) : void ->foobar : ({bar, ...opts}?: any) => void +>foobar : ({ bar, ...opts }?: any) => void >{ bar: { greeting: 'hello' } } : { bar: { greeting: string; }; } >bar : { greeting: string; } >{ greeting: 'hello' } : { greeting: string; } diff --git a/tests/baselines/reference/parameterInitializerBeforeDestructuringEmit.types b/tests/baselines/reference/parameterInitializerBeforeDestructuringEmit.types index 46b5983a514..d276812c01d 100644 --- a/tests/baselines/reference/parameterInitializerBeforeDestructuringEmit.types +++ b/tests/baselines/reference/parameterInitializerBeforeDestructuringEmit.types @@ -10,7 +10,7 @@ interface Foo { } function foobar({ bar = {}, ...opts }: Foo = {}) { ->foobar : ({bar, ...opts}?: Foo) => void +>foobar : ({ bar, ...opts }?: Foo) => void >bar : any >{} : {} >opts : { baz?: any; } diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types index eef87d57c45..bbd13dddf57 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.types @@ -37,7 +37,7 @@ var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "no >"none" : "none" function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { ->foo1 : ({skills: {primary: primaryA, secondary: secondaryA}}: Robot) => void +>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) => void >skills : any >primary : any >primaryA : string @@ -53,7 +53,7 @@ function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { >primaryA : string } function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { ->foo2 : ({name: nameC, skills: {primary: primaryB, secondary: secondaryB}}: Robot) => void +>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) => void >name : any >nameC : string >skills : any @@ -71,7 +71,7 @@ function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB >secondaryB : string } function foo3({ skills }: Robot) { ->foo3 : ({skills}: Robot) => void +>foo3 : ({ skills }: Robot) => void >skills : { primary: string; secondary: string; } >Robot : Robot @@ -87,12 +87,12 @@ function foo3({ skills }: Robot) { foo1(robotA); >foo1(robotA) : void ->foo1 : ({skills: {primary: primaryA, secondary: secondaryA}}: Robot) => void +>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) => void >robotA : Robot foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void ->foo1 : ({skills: {primary: primaryA, secondary: secondaryA}}: Robot) => void +>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) => void >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } >name : string >"Edger" : "Edger" @@ -105,12 +105,12 @@ foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" foo2(robotA); >foo2(robotA) : void ->foo2 : ({name: nameC, skills: {primary: primaryB, secondary: secondaryB}}: Robot) => void +>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) => void >robotA : Robot foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void ->foo2 : ({name: nameC, skills: {primary: primaryB, secondary: secondaryB}}: Robot) => void +>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) => void >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } >name : string >"Edger" : "Edger" @@ -123,12 +123,12 @@ foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" foo3(robotA); >foo3(robotA) : void ->foo3 : ({skills}: Robot) => void +>foo3 : ({ skills }: Robot) => void >robotA : Robot foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void ->foo3 : ({skills}: Robot) => void +>foo3 : ({ skills }: Robot) => void >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } >name : string >"Edger" : "Edger" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types index 9f5b16407ca..d9c8b319752 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.types @@ -37,7 +37,7 @@ var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "no >"none" : "none" function foo1( ->foo1 : ({skills: {primary: primaryA, secondary: secondaryA}}?: Robot) => void +>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }?: Robot) => void { skills: { >skills : any @@ -71,7 +71,7 @@ function foo1( >primaryA : string } function foo2( ->foo2 : ({name: nameC, skills: {primary: primaryB, secondary: secondaryB}}?: Robot) => void +>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }?: Robot) => void { name: nameC = "name", >name : any @@ -110,7 +110,7 @@ function foo2( >secondaryB : string } function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { ->foo3 : ({skills}?: Robot) => void +>foo3 : ({ skills }?: Robot) => void >skills : { primary?: string; secondary?: string; } >{ primary: "SomeSkill", secondary: "someSkill" } : { primary: string; secondary: string; } >primary : string @@ -132,12 +132,12 @@ function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Ro foo1(robotA); >foo1(robotA) : void ->foo1 : ({skills: {primary: primaryA, secondary: secondaryA}}?: Robot) => void +>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }?: Robot) => void >robotA : Robot foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void ->foo1 : ({skills: {primary: primaryA, secondary: secondaryA}}?: Robot) => void +>foo1 : ({ skills: { primary: primaryA, secondary: secondaryA } }?: Robot) => void >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } >name : string >"Edger" : "Edger" @@ -150,12 +150,12 @@ foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" foo2(robotA); >foo2(robotA) : void ->foo2 : ({name: nameC, skills: {primary: primaryB, secondary: secondaryB}}?: Robot) => void +>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }?: Robot) => void >robotA : Robot foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void ->foo2 : ({name: nameC, skills: {primary: primaryB, secondary: secondaryB}}?: Robot) => void +>foo2 : ({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }?: Robot) => void >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } >name : string >"Edger" : "Edger" @@ -168,12 +168,12 @@ foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" foo3(robotA); >foo3(robotA) : void ->foo3 : ({skills}?: Robot) => void +>foo3 : ({ skills }?: Robot) => void >robotA : Robot foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) : void ->foo3 : ({skills}?: Robot) => void +>foo3 : ({ skills }?: Robot) => void >{ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } : { name: string; skills: { primary: string; secondary: string; }; } >name : string >"Edger" : "Edger" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types index 225071a3d2e..5185ab35994 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPattern.types @@ -29,7 +29,7 @@ var robotA: Robot = { name: "mower", skill: "mowing" }; >"mowing" : "mowing" function foo1({ name: nameA }: Robot) { ->foo1 : ({name: nameA}: Robot) => void +>foo1 : ({ name: nameA }: Robot) => void >name : any >nameA : string >Robot : Robot @@ -42,7 +42,7 @@ function foo1({ name: nameA }: Robot) { >nameA : string } function foo2({ name: nameB, skill: skillB }: Robot) { ->foo2 : ({name: nameB, skill: skillB}: Robot) => void +>foo2 : ({ name: nameB, skill: skillB }: Robot) => void >name : any >nameB : string >skill : any @@ -57,7 +57,7 @@ function foo2({ name: nameB, skill: skillB }: Robot) { >nameB : string } function foo3({ name }: Robot) { ->foo3 : ({name}: Robot) => void +>foo3 : ({ name }: Robot) => void >name : string >Robot : Robot @@ -71,12 +71,12 @@ function foo3({ name }: Robot) { foo1(robotA); >foo1(robotA) : void ->foo1 : ({name: nameA}: Robot) => void +>foo1 : ({ name: nameA }: Robot) => void >robotA : Robot foo1({ name: "Edger", skill: "cutting edges" }); >foo1({ name: "Edger", skill: "cutting edges" }) : void ->foo1 : ({name: nameA}: Robot) => void +>foo1 : ({ name: nameA }: Robot) => void >{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } >name : string >"Edger" : "Edger" @@ -85,12 +85,12 @@ foo1({ name: "Edger", skill: "cutting edges" }); foo2(robotA); >foo2(robotA) : void ->foo2 : ({name: nameB, skill: skillB}: Robot) => void +>foo2 : ({ name: nameB, skill: skillB }: Robot) => void >robotA : Robot foo2({ name: "Edger", skill: "cutting edges" }); >foo2({ name: "Edger", skill: "cutting edges" }) : void ->foo2 : ({name: nameB, skill: skillB}: Robot) => void +>foo2 : ({ name: nameB, skill: skillB }: Robot) => void >{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } >name : string >"Edger" : "Edger" @@ -99,12 +99,12 @@ foo2({ name: "Edger", skill: "cutting edges" }); foo3(robotA); >foo3(robotA) : void ->foo3 : ({name}: Robot) => void +>foo3 : ({ name }: Robot) => void >robotA : Robot foo3({ name: "Edger", skill: "cutting edges" }); >foo3({ name: "Edger", skill: "cutting edges" }) : void ->foo3 : ({name}: Robot) => void +>foo3 : ({ name }: Robot) => void >{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } >name : string >"Edger" : "Edger" diff --git a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types index db6a8bcab29..ca6670e5561 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types +++ b/tests/baselines/reference/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.types @@ -29,7 +29,7 @@ var robotA: Robot = { name: "mower", skill: "mowing" }; >"mowing" : "mowing" function foo1({ name: nameA = "" }: Robot = { }) { ->foo1 : ({name: nameA}?: Robot) => void +>foo1 : ({ name: nameA }?: Robot) => void >name : any >nameA : string >"" : "" @@ -44,7 +44,7 @@ function foo1({ name: nameA = "" }: Robot = { }) { >nameA : string } function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { ->foo2 : ({name: nameB, skill: skillB}?: Robot) => void +>foo2 : ({ name: nameB, skill: skillB }?: Robot) => void >name : any >nameB : string >"" : "" @@ -62,7 +62,7 @@ function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = { >nameB : string } function foo3({ name = "" }: Robot = {}) { ->foo3 : ({name}?: Robot) => void +>foo3 : ({ name }?: Robot) => void >name : string >"" : "" >Robot : Robot @@ -78,12 +78,12 @@ function foo3({ name = "" }: Robot = {}) { foo1(robotA); >foo1(robotA) : void ->foo1 : ({name: nameA}?: Robot) => void +>foo1 : ({ name: nameA }?: Robot) => void >robotA : Robot foo1({ name: "Edger", skill: "cutting edges" }); >foo1({ name: "Edger", skill: "cutting edges" }) : void ->foo1 : ({name: nameA}?: Robot) => void +>foo1 : ({ name: nameA }?: Robot) => void >{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } >name : string >"Edger" : "Edger" @@ -92,12 +92,12 @@ foo1({ name: "Edger", skill: "cutting edges" }); foo2(robotA); >foo2(robotA) : void ->foo2 : ({name: nameB, skill: skillB}?: Robot) => void +>foo2 : ({ name: nameB, skill: skillB }?: Robot) => void >robotA : Robot foo2({ name: "Edger", skill: "cutting edges" }); >foo2({ name: "Edger", skill: "cutting edges" }) : void ->foo2 : ({name: nameB, skill: skillB}?: Robot) => void +>foo2 : ({ name: nameB, skill: skillB }?: Robot) => void >{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } >name : string >"Edger" : "Edger" @@ -106,12 +106,12 @@ foo2({ name: "Edger", skill: "cutting edges" }); foo3(robotA); >foo3(robotA) : void ->foo3 : ({name}?: Robot) => void +>foo3 : ({ name }?: Robot) => void >robotA : Robot foo3({ name: "Edger", skill: "cutting edges" }); >foo3({ name: "Edger", skill: "cutting edges" }) : void ->foo3 : ({name}?: Robot) => void +>foo3 : ({ name }?: Robot) => void >{ name: "Edger", skill: "cutting edges" } : { name: string; skill: string; } >name : string >"Edger" : "Edger" diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution13.types b/tests/baselines/reference/tsxSpreadAttributesResolution13.types index 5b5ada68613..0ad324c25b1 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution13.types +++ b/tests/baselines/reference/tsxSpreadAttributesResolution13.types @@ -28,7 +28,7 @@ export default function Component(props: ComponentProps) { > : JSX.Element ->ChildComponent : ({property1}: AnotherComponentProps) => JSX.Element +>ChildComponent : ({ property1 }: AnotherComponentProps) => JSX.Element >props : ComponentProps ); @@ -37,7 +37,7 @@ export default function Component(props: ComponentProps) { return (); >() : JSX.Element > : JSX.Element ->ChildComponent : ({property1}: AnotherComponentProps) => JSX.Element +>ChildComponent : ({ property1 }: AnotherComponentProps) => JSX.Element >props : ComponentProps >property1 : string } @@ -51,7 +51,7 @@ interface AnotherComponentProps { } function ChildComponent({ property1 }: AnotherComponentProps) { ->ChildComponent : ({property1}: AnotherComponentProps) => JSX.Element +>ChildComponent : ({ property1 }: AnotherComponentProps) => JSX.Element >property1 : string >AnotherComponentProps : AnotherComponentProps diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution15.types b/tests/baselines/reference/tsxSpreadAttributesResolution15.types index dbcb6541a03..152ad3f696e 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution15.types +++ b/tests/baselines/reference/tsxSpreadAttributesResolution15.types @@ -22,7 +22,7 @@ export default function Component(props: ComponentProps) { > : JSX.Element ->AnotherComponent : ({property1}: AnotherComponentProps) => JSX.Element +>AnotherComponent : ({ property1 }: AnotherComponentProps) => JSX.Element >props : ComponentProps >property2 : true >AnotherProperty1 : string @@ -44,7 +44,7 @@ interface AnotherComponentProps { } function AnotherComponent({ property1 }: AnotherComponentProps) { ->AnotherComponent : ({property1}: AnotherComponentProps) => JSX.Element +>AnotherComponent : ({ property1 }: AnotherComponentProps) => JSX.Element >property1 : string >AnotherComponentProps : AnotherComponentProps diff --git a/tests/baselines/reference/tsxSpreadChildren.types b/tests/baselines/reference/tsxSpreadChildren.types index 7f4609c30b8..c762e45b593 100644 --- a/tests/baselines/reference/tsxSpreadChildren.types +++ b/tests/baselines/reference/tsxSpreadChildren.types @@ -53,7 +53,7 @@ function Todo(prop: { key: number, todo: string }) { >div : any } function TodoList({ todos }: TodoListProps) { ->TodoList : ({todos}: TodoListProps) => JSX.Element +>TodoList : ({ todos }: TodoListProps) => JSX.Element >todos : TodoProp[] >TodoListProps : TodoListProps @@ -88,6 +88,6 @@ let x: TodoListProps; > : JSX.Element ->TodoList : ({todos}: TodoListProps) => JSX.Element +>TodoList : ({ todos }: TodoListProps) => JSX.Element >x : TodoListProps diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types index 8e288ebd34a..875f8018a95 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types @@ -79,21 +79,21 @@ const c5 = Hello declare function TestingOneThing({y1: string}): JSX.Element; ->TestingOneThing : { ({y1: string}: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } +>TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } >y1 : any >string : any >JSX : any >Element : JSX.Element declare function TestingOneThing(j: {"extra-data": string, yy?: string}): JSX.Element; ->TestingOneThing : { ({y1: string}: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } +>TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } >j : { "extra-data": string; yy?: string; } >yy : string >JSX : any >Element : JSX.Element declare function TestingOneThing(n: {yy: number, direction?: number}): JSX.Element; ->TestingOneThing : { ({y1: string}: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } +>TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } >n : { yy: number; direction?: number; } >yy : number >direction : number @@ -101,7 +101,7 @@ declare function TestingOneThing(n: {yy: number, direction?: number}): JSX.Eleme >Element : JSX.Element declare function TestingOneThing(n: {yy: string, name: string}): JSX.Element; ->TestingOneThing : { ({y1: string}: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } +>TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } >n : { yy: string; name: string; } >yy : string >name : string @@ -112,27 +112,27 @@ declare function TestingOneThing(n: {yy: string, name: string}): JSX.Element; const d1 = ; >d1 : JSX.Element > : JSX.Element ->TestingOneThing : { ({y1: string}: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } +>TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } >y1 : true >extra-data : true const d2 = ; >d2 : JSX.Element > : JSX.Element ->TestingOneThing : { ({y1: string}: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } +>TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } >extra-data : string const d3 = ; >d3 : JSX.Element > : JSX.Element ->TestingOneThing : { ({y1: string}: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } +>TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } >extra-data : string >yy : string const d4 = ; >d4 : JSX.Element > : JSX.Element ->TestingOneThing : { ({y1: string}: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } +>TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } >extra-data : string >yy : number >9 : 9 @@ -142,7 +142,7 @@ const d4 = ; const d5 = ; >d5 : JSX.Element > : JSX.Element ->TestingOneThing : { ({y1: string}: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } +>TestingOneThing : { ({ y1: string }: { y1: any; }): JSX.Element; (j: { "extra-data": string; yy?: string; }): JSX.Element; (n: { yy: number; direction?: number; }): JSX.Element; (n: { yy: string; name: string; }): JSX.Element; } >extra-data : string >yy : string >name : string diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents3.types b/tests/baselines/reference/tsxStatelessFunctionComponents3.types index 879f8c75cdf..e01c8454aa7 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents3.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponents3.types @@ -40,7 +40,7 @@ var App: React.StatelessComponent<{ children }> = ({children}) => ( >React : any >StatelessComponent : React.StatelessComponent

>children : any ->({children}) => (

) : ({children}: { children: any; } & { children?: React.ReactNode; }) => JSX.Element +>({children}) => (
) : ({ children }: { children: any; } & { children?: React.ReactNode; }) => JSX.Element >children : any >(
) : JSX.Element