diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts
index 6098245cb6c67..2770f601b86e6 100644
--- a/src/compiler/checker.ts
+++ b/src/compiler/checker.ts
@@ -6620,8 +6620,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
if (
context.flags & NodeBuilderFlags.GenerateNamesForShadowedTypeParams &&
- type.flags & TypeFlags.TypeParameter &&
- !isTypeSymbolAccessible(type.symbol, context.enclosingDeclaration)
+ type.flags & TypeFlags.TypeParameter
) {
const name = typeParameterToName(type, context);
context.approximateLength += idText(name).length;
@@ -7510,7 +7509,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
&& signature.declaration
&& signature.declaration !== context.enclosingDeclaration
&& !isInJSFile(signature.declaration)
- && some(expandedParams)
+ && (some(expandedParams) || some(signature.typeParameters))
) {
// As a performance optimization, reuse the same fake scope within this chain.
// This is especially needed when we are working on an excessively deep type;
@@ -7534,7 +7533,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
const locals = existingFakeScope?.locals ?? createSymbolTable();
let newLocals: __String[] | undefined;
- for (const param of expandedParams) {
+ for (const param of concatenate(expandedParams, map(signature.typeParameters, p => p.symbol))) {
if (!locals.has(param.escapedName)) {
newLocals = append(newLocals, param.escapedName);
locals.set(param.escapedName, param);
@@ -8149,7 +8148,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
// `i` we've used thus far, to save work later
(context.typeParameterNamesByTextNextNameCount ||= new Map()).set(rawtext, i);
(context.typeParameterNames ||= new Map()).set(getTypeId(type), result);
- (context.typeParameterNamesByText ||= new Set()).add(rawtext);
+ (context.typeParameterNamesByText ||= new Set()).add(text);
}
return result;
}
@@ -8407,8 +8406,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
includePrivateSymbol?.(sym);
}
if (isIdentifier(node)) {
- const type = getDeclaredTypeOfSymbol(sym);
- const name = sym.flags & SymbolFlags.TypeParameter && !isTypeSymbolAccessible(type.symbol, context.enclosingDeclaration) ? typeParameterToName(type, context) : factory.cloneNode(node);
+ const name = sym.flags & SymbolFlags.TypeParameter && context.flags & NodeBuilderFlags.GenerateNamesForShadowedTypeParams ? typeParameterToName(getDeclaredTypeOfSymbol(sym), context) : factory.cloneNode(node);
name.symbol = sym; // for quickinfo, which uses identifier symbol information
return { introducesError, node: setEmitFlags(setOriginalNode(name, node), EmitFlags.NoAsciiEscaping) };
}
@@ -8552,6 +8550,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
setEmitFlags(node, EmitFlags.SingleLine);
}
+ if (isTypeLiteralNode(node) && !(context.flags & NodeBuilderFlags.MultilineObjectLiterals)) {
+ // always clone to add node builder format flags
+ let visited = visitEachChild(node, visitExistingNodeTreeSymbols, nullTransformationContext);
+ visited = visited === node ? factory.cloneNode(visited) : visited;
+ setEmitFlags(visited, EmitFlags.SingleLine);
+ return visited;
+ }
+
return visitEachChild(node, visitExistingNodeTreeSymbols, nullTransformationContext);
function getEffectiveDotDotDotForParameter(p: ParameterDeclaration) {
diff --git a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.types b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.types
index b2b63a2c4e8e3..474e980c43ecb 100644
--- a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.types
+++ b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.types
@@ -13,7 +13,7 @@ module A {
}
export var UnitSquare : {
->UnitSquare : { top: { left: Point; right: Point;}; bottom: { left: Point; right: Point;}; }
+>UnitSquare : { top: { left: Point; right: Point; }; bottom: { left: Point; right: Point; }; }
top: { left: Point, right: Point },
>top : { left: Point; right: Point; }
diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.types b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.types
index 3e3334393fdbf..cce94ce1aac6d 100644
--- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.types
+++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.types
@@ -35,7 +35,7 @@ module A {
=== test.ts ===
var fn: () => { x: number; y: number };
->fn : () => { x: number; y: number;}
+>fn : () => { x: number; y: number; }
>x : number
>y : number
diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types
index 6a1233bff157b..5a250921afc07 100644
--- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types
+++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types
@@ -35,7 +35,7 @@ module B {
=== test.ts ===
var fn: () => { x: number; y: number };
->fn : () => { x: number; y: number;}
+>fn : () => { x: number; y: number; }
>x : number
>y : number
diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.types b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.types
index 1dc36a08ef444..648b7c84b09a0 100644
--- a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.types
+++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.types
@@ -84,7 +84,7 @@ var p = Geometry.Origin;
>Origin : A.Point
var line: { start: { x: number; y: number }; end: { x: number; y: number; } };
->line : { start: { x: number; y: number;}; end: { x: number; y: number;}; }
+>line : { start: { x: number; y: number; }; end: { x: number; y: number; }; }
>start : { x: number; y: number; }
>x : number
>y : number
diff --git a/tests/baselines/reference/accessorsOverrideProperty8.types b/tests/baselines/reference/accessorsOverrideProperty8.types
index f922554ae6740..4f88f1993b020 100644
--- a/tests/baselines/reference/accessorsOverrideProperty8.types
+++ b/tests/baselines/reference/accessorsOverrideProperty8.types
@@ -16,7 +16,7 @@ type AnyCtor
= new (...a: any[]) => P
>a : any[]
declare function classWithProperties(properties: T, klass: AnyCtor): {
->classWithProperties : (properties: T, klass: AnyCtor) => { new (): P & Properties; prototype: P & Properties;}
+>classWithProperties : (properties: T, klass: AnyCtor) => { new (): P & Properties; prototype: P & Properties; }
>key : string
>properties : T
>klass : AnyCtor
diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.types b/tests/baselines/reference/aliasUsageInObjectLiteral.types
index f523ac40b7f5c..7bae06186454e 100644
--- a/tests/baselines/reference/aliasUsageInObjectLiteral.types
+++ b/tests/baselines/reference/aliasUsageInObjectLiteral.types
@@ -30,7 +30,7 @@ var b: { x: IHasVisualizationModel } = { x: moduleA };
>moduleA : typeof moduleA
var c: { y: { z: IHasVisualizationModel } } = { y: { z: moduleA } };
->c : { y: { z: IHasVisualizationModel;}; }
+>c : { y: { z: IHasVisualizationModel; }; }
>y : { z: IHasVisualizationModel; }
>z : IHasVisualizationModel
>{ y: { z: moduleA } } : { y: { z: typeof moduleA; }; }
diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.types b/tests/baselines/reference/anyAssignabilityInInheritance.types
index 91802c6e0adb7..2be1b6f737db4 100644
--- a/tests/baselines/reference/anyAssignabilityInInheritance.types
+++ b/tests/baselines/reference/anyAssignabilityInInheritance.types
@@ -85,7 +85,7 @@ var r3 = foo3(a); // any
>a : any
declare function foo7(x: { bar: number }): { bar: number };
->foo7 : { (x: { bar: number;}): { bar: number;}; (x: any): any; }
+>foo7 : { (x: { bar: number; }): { bar: number; }; (x: any): any; }
>x : { bar: number; }
>bar : number
>bar : number
diff --git a/tests/baselines/reference/argumentExpressionContextualTyping.types b/tests/baselines/reference/argumentExpressionContextualTyping.types
index 7f2a00182a805..193f1b83252ce 100644
--- a/tests/baselines/reference/argumentExpressionContextualTyping.types
+++ b/tests/baselines/reference/argumentExpressionContextualTyping.types
@@ -47,7 +47,7 @@ var o = { x: ["string", 1], y: { c: true, d: "world", e: 3 } };
>3 : 3
var o1: { x: [string, number], y: { c: boolean, d: string, e: number } } = { x: ["string", 1], y: { c: true, d: "world", e: 3 } };
->o1 : { x: [string, number]; y: { c: boolean; d: string; e: number;}; }
+>o1 : { x: [string, number]; y: { c: boolean; d: string; e: number; }; }
>x : [string, number]
>y : { c: boolean; d: string; e: number; }
>c : boolean
diff --git a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types
index 032764689df88..773948a4648f7 100644
--- a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types
+++ b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types
@@ -58,28 +58,28 @@ var es = [(x: string) => 2, (x: Object) => 1]; // { (x:string) => number }[]
>1 : 1
var fs = [(a: { x: number; y?: number }) => 1, (b: { x: number; z?: number }) => 2]; // (a: { x: number; y?: number }) => number[]
->fs : (((a: { x: number; y?: number;}) => number) | ((b: { x: number; z?: number;}) => number))[]
->[(a: { x: number; y?: number }) => 1, (b: { x: number; z?: number }) => 2] : (((a: { x: number; y?: number;}) => number) | ((b: { x: number; z?: number;}) => number))[]
->(a: { x: number; y?: number }) => 1 : (a: { x: number; y?: number;}) => number
+>fs : (((a: { x: number; y?: number; }) => number) | ((b: { x: number; z?: number; }) => number))[]
+>[(a: { x: number; y?: number }) => 1, (b: { x: number; z?: number }) => 2] : (((a: { x: number; y?: number; }) => number) | ((b: { x: number; z?: number; }) => number))[]
+>(a: { x: number; y?: number }) => 1 : (a: { x: number; y?: number; }) => number
>a : { x: number; y?: number; }
>x : number
>y : number
>1 : 1
->(b: { x: number; z?: number }) => 2 : (b: { x: number; z?: number;}) => number
+>(b: { x: number; z?: number }) => 2 : (b: { x: number; z?: number; }) => number
>b : { x: number; z?: number; }
>x : number
>z : number
>2 : 2
var gs = [(b: { x: number; z?: number }) => 2, (a: { x: number; y?: number }) => 1]; // (b: { x: number; z?: number }) => number[]
->gs : (((b: { x: number; z?: number;}) => number) | ((a: { x: number; y?: number;}) => number))[]
->[(b: { x: number; z?: number }) => 2, (a: { x: number; y?: number }) => 1] : (((b: { x: number; z?: number;}) => number) | ((a: { x: number; y?: number;}) => number))[]
->(b: { x: number; z?: number }) => 2 : (b: { x: number; z?: number;}) => number
+>gs : (((b: { x: number; z?: number; }) => number) | ((a: { x: number; y?: number; }) => number))[]
+>[(b: { x: number; z?: number }) => 2, (a: { x: number; y?: number }) => 1] : (((b: { x: number; z?: number; }) => number) | ((a: { x: number; y?: number; }) => number))[]
+>(b: { x: number; z?: number }) => 2 : (b: { x: number; z?: number; }) => number
>b : { x: number; z?: number; }
>x : number
>z : number
>2 : 2
->(a: { x: number; y?: number }) => 1 : (a: { x: number; y?: number;}) => number
+>(a: { x: number; y?: number }) => 1 : (a: { x: number; y?: number; }) => number
>a : { x: number; y?: number; }
>x : number
>y : number
diff --git a/tests/baselines/reference/arraySigChecking.types b/tests/baselines/reference/arraySigChecking.types
index 161463fd6e35d..0cea993b4faec 100644
--- a/tests/baselines/reference/arraySigChecking.types
+++ b/tests/baselines/reference/arraySigChecking.types
@@ -52,7 +52,7 @@ myArray = [[1, 2]];
>2 : 2
function isEmpty(l: { length: number }) {
->isEmpty : (l: { length: number;}) => boolean
+>isEmpty : (l: { length: number; }) => boolean
>l : { length: number; }
>length : number
diff --git a/tests/baselines/reference/assignmentCompatBug5.types b/tests/baselines/reference/assignmentCompatBug5.types
index e2703de4e59d6..1c1035c5db89e 100644
--- a/tests/baselines/reference/assignmentCompatBug5.types
+++ b/tests/baselines/reference/assignmentCompatBug5.types
@@ -2,7 +2,7 @@
=== assignmentCompatBug5.ts ===
function foo1(x: { a: number; }) { }
->foo1 : (x: { a: number;}) => void
+>foo1 : (x: { a: number; }) => void
>x : { a: number; }
>a : number
diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types
index a86aed10bb821..4c404293ccfbc 100644
--- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types
+++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types
@@ -2,7 +2,7 @@
=== assignmentCompatFunctionsWithOptionalArgs.ts ===
function foo(x: { id: number; name?: string; }): void;
->foo : (x: { id: number; name?: string;}) => void
+>foo : (x: { id: number; name?: string; }) => void
>x : { id: number; name?: string; }
>id : number
>name : string
diff --git a/tests/baselines/reference/assignmentCompatOnNew.types b/tests/baselines/reference/assignmentCompatOnNew.types
index 2982bd7e03286..7e5cc3a44b1dc 100644
--- a/tests/baselines/reference/assignmentCompatOnNew.types
+++ b/tests/baselines/reference/assignmentCompatOnNew.types
@@ -5,7 +5,7 @@ class Foo{};
>Foo : Foo
function bar(x: {new(): Foo;}){}
->bar : (x: { new (): Foo;}) => void
+>bar : (x: { new (): Foo; }) => void
>x : new () => Foo
bar(Foo); // Error, but should be allowed
diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.types b/tests/baselines/reference/assignmentCompatWithCallSignatures3.types
index 4c11234186aff..4897e7a9ff40b 100644
--- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.types
+++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.types
@@ -76,7 +76,7 @@ var a10: (...x: Derived[]) => Derived;
>x : Derived[]
var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base;
->a11 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base
+>a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>x : { foo: string; }
>foo : string
>y : { foo: string; bar: string; }
@@ -94,7 +94,7 @@ var a13: (x: Array, y: Array) => Array;
>y : Derived[]
var a14: (x: { a: string; b: number }) => Object;
->a14 : (x: { a: string; b: number;}) => Object
+>a14 : (x: { a: string; b: number; }) => Object
>x : { a: string; b: number; }
>a : string
>b : number
@@ -276,10 +276,10 @@ b8 = a8; // ok
>a8 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
var b9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U;
->b9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U
+>b9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
>x : (arg: T) => U
>arg : T
->y : (arg2: { foo: string; bing: number;}) => U
+>y : (arg2: { foo: string; bing: number; }) => U
>arg2 : { foo: string; bing: number; }
>foo : string
>bing : number
diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.types b/tests/baselines/reference/assignmentCompatWithCallSignatures4.types
index 9bbb6314447dc..1803c80f0c3d4 100644
--- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.types
+++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.types
@@ -52,7 +52,7 @@ module Errors {
>x : Base[]
var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base;
->a11 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base
+>a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>x : { foo: string; }
>foo : string
>y : { foo: string; bar: string; }
@@ -75,7 +75,7 @@ module Errors {
};
var a15: (x: { a: string; b: number }) => number;
->a15 : (x: { a: string; b: number;}) => number
+>a15 : (x: { a: string; b: number; }) => number
>x : { a: string; b: number; }
>a : string
>b : number
@@ -160,10 +160,10 @@ module Errors {
>a7 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U;
->b8 : (x: (arg: T) => U, y: (arg2: { foo: number;}) => U) => (r: T) => U
+>b8 : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
>x : (arg: T) => U
>arg : T
->y : (arg2: { foo: number;}) => U
+>y : (arg2: { foo: number; }) => U
>arg2 : { foo: number; }
>foo : number
>r : T
diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types
index beeb022033c73..380cf283f4c78 100644
--- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types
+++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types
@@ -76,7 +76,7 @@ var a10: new (...x: Derived[]) => Derived;
>x : Derived[]
var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base;
->a11 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base
+>a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>x : { foo: string; }
>foo : string
>y : { foo: string; bar: string; }
@@ -94,7 +94,7 @@ var a13: new (x: Array, y: Array) => Array;
>y : Derived[]
var a14: new (x: { a: string; b: number }) => Object;
->a14 : new (x: { a: string; b: number;}) => Object
+>a14 : new (x: { a: string; b: number; }) => Object
>x : { a: string; b: number; }
>a : string
>b : number
@@ -276,10 +276,10 @@ b8 = a8; // ok
>a8 : new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
var b9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U;
->b9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U
+>b9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
>x : (arg: T) => U
>arg : T
->y : (arg2: { foo: string; bing: number;}) => U
+>y : (arg2: { foo: string; bing: number; }) => U
>arg2 : { foo: string; bing: number; }
>foo : string
>bing : number
diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types
index 5e3a05a1329fe..66056b5ebda94 100644
--- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types
+++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types
@@ -52,7 +52,7 @@ module Errors {
>x : Base[]
var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base;
->a11 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base
+>a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>x : { foo: string; }
>foo : string
>y : { foo: string; bar: string; }
@@ -75,7 +75,7 @@ module Errors {
};
var a15: new (x: { a: string; b: number }) => number;
->a15 : new (x: { a: string; b: number;}) => number
+>a15 : new (x: { a: string; b: number; }) => number
>x : { a: string; b: number; }
>a : string
>b : number
@@ -160,10 +160,10 @@ module Errors {
>a7 : new (x: (arg: Base) => Derived) => (r: Base) => Derived2
var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U;
->b8 : new (x: (arg: T) => U, y: (arg2: { foo: number;}) => U) => (r: T) => U
+>b8 : new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
>x : (arg: T) => U
>arg : T
->y : (arg2: { foo: number;}) => U
+>y : (arg2: { foo: number; }) => U
>arg2 : { foo: number; }
>foo : number
>r : T
diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.types b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.types
index 9e4ac0ffb949c..d0239ece68bf1 100644
--- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.types
+++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.types
@@ -186,7 +186,7 @@ fn = () => 3; // Bug 823548: Should be error (fn is not a reference)
>3 : 3
function fn2(x: number, y: { t: number }) {
->fn2 : (x: number, y: { t: number;}) => void
+>fn2 : (x: number, y: { t: number; }) => void
>x : number
>y : { t: number; }
>t : number
diff --git a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.types b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.types
index c27188b2d2ee7..40097f5204b33 100644
--- a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.types
+++ b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.types
@@ -3,10 +3,10 @@
=== asyncFunctionReturnExpressionErrorSpans.ts ===
interface Foo {
bar: {
->bar : { baz: { inner: { thing: string; };}; }
+>bar : { baz: { inner: { thing: string; }; }; }
baz: {
->baz : { inner: { thing: string;}; }
+>baz : { inner: { thing: string; }; }
inner: {
>inner : { thing: string; }
diff --git a/tests/baselines/reference/awaitUnionPromise.types b/tests/baselines/reference/awaitUnionPromise.types
index 14c95ffdb4585..f5e99c33b690c 100644
--- a/tests/baselines/reference/awaitUnionPromise.types
+++ b/tests/baselines/reference/awaitUnionPromise.types
@@ -17,7 +17,7 @@ interface IAsyncEnumerator {
>next3 : () => Promise
next4(): Promise;
->next4 : () => Promise
+>next4 : () => Promise
>x : string
}
diff --git a/tests/baselines/reference/callChain.2.types b/tests/baselines/reference/callChain.2.types
index 845e3dfea5848..a23a131657a0b 100644
--- a/tests/baselines/reference/callChain.2.types
+++ b/tests/baselines/reference/callChain.2.types
@@ -19,8 +19,8 @@ o2?.b();
>b : () => number
declare const o3: { b: (() => { c: string }) | undefined };
->o3 : { b: (() => { c: string;}) | undefined; }
->b : () => { c: string;}
+>o3 : { b: (() => { c: string; }) | undefined; }
+>b : () => { c: string; }
>c : string
o3.b?.().c;
diff --git a/tests/baselines/reference/callChain.3.types b/tests/baselines/reference/callChain.3.types
index 04b3c2d02032d..8d6cc701e61c3 100644
--- a/tests/baselines/reference/callChain.3.types
+++ b/tests/baselines/reference/callChain.3.types
@@ -6,7 +6,7 @@ declare function absorb(): T;
declare const a: { m?(obj: {x: T}): T } | undefined;
>a : { m?(obj: { x: T; }): T; } | undefined
->m : ((obj: { x: T;}) => T) | undefined
+>m : ((obj: { x: T; }) => T) | undefined
>obj : { x: T; }
>x : T
diff --git a/tests/baselines/reference/callChain.types b/tests/baselines/reference/callChain.types
index aafdc88d22f5d..0b327b0adb557 100644
--- a/tests/baselines/reference/callChain.types
+++ b/tests/baselines/reference/callChain.types
@@ -108,8 +108,8 @@ o2?.["b"](1, ...[2, 3], 4);
>4 : 4
declare const o3: { b: ((...args: any[]) => { c: string }) | undefined };
->o3 : { b: ((...args: any[]) => { c: string;}) | undefined; }
->b : ((...args: any[]) => { c: string;}) | undefined
+>o3 : { b: ((...args: any[]) => { c: string; }) | undefined; }
+>b : ((...args: any[]) => { c: string; }) | undefined
>args : any[]
>c : string
diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types
index e663dd090d028..35ee53fd23f48 100644
--- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types
+++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types
@@ -78,7 +78,7 @@ interface A { // T
>x : Derived[]
a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base;
->a11 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base
+>a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>x : { foo: string; }
>foo : string
>y : { foo: string; bar: string; }
@@ -96,7 +96,7 @@ interface A { // T
>y : Derived[]
a14: (x: { a: string; b: number }) => Object;
->a14 : (x: { a: string; b: number;}) => Object
+>a14 : (x: { a: string; b: number; }) => Object
>x : { a: string; b: number; }
>a : string
>b : number
@@ -204,10 +204,10 @@ interface I extends A {
>r : T
a9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; // ok, same as a8 with compatible object literal
->a9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U
+>a9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
>x : (arg: T) => U
>arg : T
->y : (arg2: { foo: string; bing: number;}) => U
+>y : (arg2: { foo: string; bing: number; }) => U
>arg2 : { foo: string; bing: number; }
>foo : string
>bing : number
diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types
index b07e8757cddbf..2ee7845539ee1 100644
--- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types
+++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types
@@ -52,7 +52,7 @@ module Errors {
>x : Base[]
a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base;
->a11 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base
+>a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>x : { foo: string; }
>foo : string
>y : { foo: string; bar: string; }
@@ -75,7 +75,7 @@ module Errors {
};
a15: (x: { a: string; b: number }) => number;
->a15 : (x: { a: string; b: number;}) => number
+>a15 : (x: { a: string; b: number; }) => number
>x : { a: string; b: number; }
>a : string
>b : number
@@ -154,10 +154,10 @@ module Errors {
interface I4 extends A {
a8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch
->a8 : (x: (arg: T) => U, y: (arg2: { foo: number;}) => U) => (r: T) => U
+>a8 : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
>x : (arg: T) => U
>arg : T
->y : (arg2: { foo: number;}) => U
+>y : (arg2: { foo: number; }) => U
>arg2 : { foo: number; }
>foo : number
>r : T
diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.types
index 1051543595877..645f8d5da0c6a 100644
--- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.types
+++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.types
@@ -79,7 +79,7 @@ interface A { // T
>x : Derived[]
a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base;
->a11 : (x: { foo: string;}, y: { foo: string; bar: string;}) => Base
+>a11 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>x : { foo: string; }
>foo : string
>y : { foo: string; bar: string; }
@@ -97,7 +97,7 @@ interface A { // T
>y : Derived[]
a14: (x: { a: string; b: number }) => Object;
->a14 : (x: { a: string; b: number;}) => Object
+>a14 : (x: { a: string; b: number; }) => Object
>x : { a: string; b: number; }
>a : string
>b : number
@@ -154,10 +154,10 @@ interface I extends B {
>r : T
a9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; // ok, same as a8 with compatible object literal
->a9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U
+>a9 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
>x : (arg: T) => U
>arg : T
->y : (arg2: { foo: string; bing: number;}) => U
+>y : (arg2: { foo: string; bing: number; }) => U
>arg2 : { foo: string; bing: number; }
>foo : string
>bing : number
diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.types
index 1e09a35b27e2d..22784d283b5b7 100644
--- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.types
+++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.types
@@ -109,7 +109,7 @@ interface I5 extends A {
interface I7 extends A {
a11: (x: { foo: T }, y: { foo: U; bar: U }) => Base;
->a11 : (x: { foo: T;}, y: { foo: U; bar: U; }) => Base
+>a11 : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base
>x : { foo: T; }
>foo : T
>y : { foo: U; bar: U; }
@@ -119,7 +119,7 @@ interface I7 extends A {
interface I9 extends A {
a16: (x: { a: T; b: T }) => T[];
->a16 : (x: { a: T; b: T;}) => T[]
+>a16 : (x: { a: T; b: T; }) => T[]
>x : { a: T; b: T; }
>a : T
>b : T
diff --git a/tests/baselines/reference/callsOnComplexSignatures.types b/tests/baselines/reference/callsOnComplexSignatures.types
index 3a49fd91878ea..a1de9046bae9c 100644
--- a/tests/baselines/reference/callsOnComplexSignatures.types
+++ b/tests/baselines/reference/callsOnComplexSignatures.types
@@ -112,17 +112,17 @@ function test3(items: string[] | number[]) {
}
function test4(
->test4 : (arg1: ((...objs: { x: number;}[]) => number) | ((...objs: { y: number;}[]) => number), arg2: ((a: { x: number;}, b: object) => number) | ((a: object, b: { x: number;}) => number), arg3: ((a: { x: number;}, ...objs: { y: number;}[]) => number) | ((...objs: { x: number;}[]) => number), arg4: ((a?: { x: number;}, b?: { x: number;}) => number) | ((a?: { y: number;}) => number), arg5: ((a?: { x: number;}, ...b: { x: number;}[]) => number) | ((a?: { y: number;}) => number), arg6: ((a?: { x: number;}, b?: { x: number;}) => number) | ((...a: { y: number;}[]) => number)) => void
+>test4 : (arg1: ((...objs: { x: number; }[]) => number) | ((...objs: { y: number; }[]) => number), arg2: ((a: { x: number; }, b: object) => number) | ((a: object, b: { x: number; }) => number), arg3: ((a: { x: number; }, ...objs: { y: number; }[]) => number) | ((...objs: { x: number; }[]) => number), arg4: ((a?: { x: number; }, b?: { x: number; }) => number) | ((a?: { y: number; }) => number), arg5: ((a?: { x: number; }, ...b: { x: number; }[]) => number) | ((a?: { y: number; }) => number), arg6: ((a?: { x: number; }, b?: { x: number; }) => number) | ((...a: { y: number; }[]) => number)) => void
arg1: ((...objs: {x: number}[]) => number) | ((...objs: {y: number}[]) => number),
->arg1 : ((...objs: { x: number;}[]) => number) | ((...objs: { y: number;}[]) => number)
+>arg1 : ((...objs: { x: number; }[]) => number) | ((...objs: { y: number; }[]) => number)
>objs : { x: number; }[]
>x : number
>objs : { y: number; }[]
>y : number
arg2: ((a: {x: number}, b: object) => number) | ((a: object, b: {x: number}) => number),
->arg2 : ((a: { x: number;}, b: object) => number) | ((a: object, b: { x: number;}) => number)
+>arg2 : ((a: { x: number; }, b: object) => number) | ((a: object, b: { x: number; }) => number)
>a : { x: number; }
>x : number
>b : object
@@ -131,7 +131,7 @@ function test4(
>x : number
arg3: ((a: {x: number}, ...objs: {y: number}[]) => number) | ((...objs: {x: number}[]) => number),
->arg3 : ((a: { x: number;}, ...objs: { y: number;}[]) => number) | ((...objs: { x: number;}[]) => number)
+>arg3 : ((a: { x: number; }, ...objs: { y: number; }[]) => number) | ((...objs: { x: number; }[]) => number)
>a : { x: number; }
>x : number
>objs : { y: number; }[]
@@ -140,7 +140,7 @@ function test4(
>x : number
arg4: ((a?: {x: number}, b?: {x: number}) => number) | ((a?: {y: number}) => number),
->arg4 : ((a?: { x: number;}, b?: { x: number;}) => number) | ((a?: { y: number;}) => number)
+>arg4 : ((a?: { x: number; }, b?: { x: number; }) => number) | ((a?: { y: number; }) => number)
>a : { x: number; } | undefined
>x : number
>b : { x: number; } | undefined
@@ -149,7 +149,7 @@ function test4(
>y : number
arg5: ((a?: {x: number}, ...b: {x: number}[]) => number) | ((a?: {y: number}) => number),
->arg5 : ((a?: { x: number;}, ...b: { x: number;}[]) => number) | ((a?: { y: number;}) => number)
+>arg5 : ((a?: { x: number; }, ...b: { x: number; }[]) => number) | ((a?: { y: number; }) => number)
>a : { x: number; } | undefined
>x : number
>b : { x: number; }[]
@@ -158,7 +158,7 @@ function test4(
>y : number
arg6: ((a?: {x: number}, b?: {x: number}) => number) | ((...a: {y: number}[]) => number),
->arg6 : ((a?: { x: number;}, b?: { x: number;}) => number) | ((...a: { y: number;}[]) => number)
+>arg6 : ((a?: { x: number; }, b?: { x: number; }) => number) | ((...a: { y: number; }[]) => number)
>a : { x: number; } | undefined
>x : number
>b : { x: number; } | undefined
@@ -360,7 +360,7 @@ function test5() {
// Union of all intrinsics and components of `any`
function App(props: { component:React.ReactType }) {
->App : (props: { component: React.ReactType;}) => JSX.Element
+>App : (props: { component: React.ReactType; }) => JSX.Element
>props : { component: React.ReactType; }
>component : React.ReactType
>React : any
diff --git a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.types b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.types
index 9db7bc6e47c21..362b4f00ac197 100644
--- a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.types
+++ b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.types
@@ -18,7 +18,7 @@ interface Sequence {
>value : T
groupBy(keySelector: (value: T) => K): Sequence<{ key: K; items: T[]; }>;
->groupBy : (keySelector: (value: T) => K) => Sequence<{ key: K; items: T[];}>
+>groupBy : (keySelector: (value: T) => K) => Sequence<{ key: K; items: T[]; }>
>keySelector : (value: T) => K
>value : T
>key : K
diff --git a/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.types b/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.types
index 49fe7334025d6..f12cdff628fa5 100644
--- a/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.types
+++ b/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.types
@@ -29,7 +29,7 @@ class AsyncLoader extends React.Component> {
}
async function load(): Promise<{ success: true } | ErrorResult> {
->load : () => Promise<{ success: true;} | ErrorResult>
+>load : () => Promise<{ success: true; } | ErrorResult>
>success : true
>true : true
diff --git a/tests/baselines/reference/checkObjectDefineProperty.types b/tests/baselines/reference/checkObjectDefineProperty.types
index db1a1e7954504..9c07d8e0339ef 100644
--- a/tests/baselines/reference/checkObjectDefineProperty.types
+++ b/tests/baselines/reference/checkObjectDefineProperty.types
@@ -179,7 +179,7 @@ Object.defineProperty(x, "zipStr", {
* @param {{name: string}} named
*/
function takeName(named) { return named.name; }
->takeName : (named: { name: string;}) => string
+>takeName : (named: { name: string; }) => string
>named : { name: string; }
>named.name : string
>named : { name: string; }
diff --git a/tests/baselines/reference/circularInstantiationExpression.types b/tests/baselines/reference/circularInstantiationExpression.types
index 49fb9cb6cf901..65430d609db28 100644
--- a/tests/baselines/reference/circularInstantiationExpression.types
+++ b/tests/baselines/reference/circularInstantiationExpression.types
@@ -8,6 +8,6 @@ declare function foo(t: T): typeof foo;
foo("");
>foo("") : (t: string) => any
->foo : (t: T) => (t: T) => any
+>foo : (t: T) => typeof foo
>"" : ""
diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.types b/tests/baselines/reference/classExtendsInterfaceInExpression.types
index c2c2c9fb7f4e5..c6b12b5a462af 100644
--- a/tests/baselines/reference/classExtendsInterfaceInExpression.types
+++ b/tests/baselines/reference/classExtendsInterfaceInExpression.types
@@ -4,7 +4,7 @@
interface A {}
function factory(a: any): {new(): Object} {
->factory : (a: any) => { new (): Object;}
+>factory : (a: any) => { new (): Object; }
>a : any
return null;
diff --git a/tests/baselines/reference/coAndContraVariantInferences.types b/tests/baselines/reference/coAndContraVariantInferences.types
index a0d29dc0e80e7..ae64219b63c54 100644
--- a/tests/baselines/reference/coAndContraVariantInferences.types
+++ b/tests/baselines/reference/coAndContraVariantInferences.types
@@ -20,10 +20,10 @@ declare function fab(arg: A | B): void;
>arg : A | B
declare function foo(x: { kind: T }, f: (arg: { kind: T }) => void): void;
->foo : (x: { kind: T;}, f: (arg: { kind: T;}) => void) => void
+>foo : (x: { kind: T; }, f: (arg: { kind: T; }) => void) => void
>x : { kind: T; }
>kind : T
->f : (arg: { kind: T;}) => void
+>f : (arg: { kind: T; }) => void
>arg : { kind: T; }
>kind : T
diff --git a/tests/baselines/reference/complicatedPrivacy.types b/tests/baselines/reference/complicatedPrivacy.types
index c43b086d817f3..b7de7d4812d18 100644
--- a/tests/baselines/reference/complicatedPrivacy.types
+++ b/tests/baselines/reference/complicatedPrivacy.types
@@ -45,7 +45,7 @@ module m1 {
}
export function f2(arg1: { x?: C1, y: number }) {
->f2 : (arg1: { x?: C1; y: number;}) => void
+>f2 : (arg1: { x?: C1; y: number; }) => void
>arg1 : { x?: C1; y: number; }
>x : C1
>y : number
@@ -62,7 +62,7 @@ module m1 {
}
export function f4(arg1:
->f4 : (arg1: { [number]: C1;}) => void
+>f4 : (arg1: { [number]: C1; }) => void
>arg1 : {}
{
[number]: C1; // Used to be indexer, now it is a computed property
diff --git a/tests/baselines/reference/computedPropertiesInDestructuring1.types b/tests/baselines/reference/computedPropertiesInDestructuring1.types
index a6066cec239cb..96cad0f5eb296 100644
--- a/tests/baselines/reference/computedPropertiesInDestructuring1.types
+++ b/tests/baselines/reference/computedPropertiesInDestructuring1.types
@@ -51,32 +51,32 @@ let [{[foo2()]: bar5}] = [{bar: "bar"}];
>"bar" : "bar"
function f1({["bar"]: x}: { bar: number }) {}
->f1 : ({ ["bar"]: x }: { bar: number;}) => void
+>f1 : ({ ["bar"]: x }: { bar: number; }) => void
>"bar" : "bar"
>x : number
>bar : number
function f2({[foo]: x}: { bar: number }) {}
->f2 : ({ [foo]: x }: { bar: number;}) => void
+>f2 : ({ [foo]: x }: { bar: number; }) => void
>foo : string
>x : any
>bar : number
function f3({[foo2()]: x}: { bar: number }) {}
->f3 : ({ [foo2()]: x }: { bar: number;}) => void
+>f3 : ({ [foo2()]: x }: { bar: number; }) => void
>foo2() : string
>foo2 : () => string
>x : any
>bar : number
function f4([{[foo]: x}]: [{ bar: number }]) {}
->f4 : ([{ [foo]: x }]: [{ bar: number;}]) => void
+>f4 : ([{ [foo]: x }]: [{ bar: number; }]) => void
>foo : string
>x : any
>bar : number
function f5([{[foo2()]: x}]: [{ bar: number }]) {}
->f5 : ([{ [foo2()]: x }]: [{ bar: number;}]) => void
+>f5 : ([{ [foo2()]: x }]: [{ bar: number; }]) => void
>foo2() : string
>foo2 : () => string
>x : any
diff --git a/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.types b/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.types
index c5843ca11604d..2a68a23345e6b 100644
--- a/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.types
+++ b/tests/baselines/reference/computedPropertiesInDestructuring1_ES6.types
@@ -58,32 +58,32 @@ let [{[foo2()]: bar5}] = [{bar: "bar"}];
>"bar" : "bar"
function f1({["bar"]: x}: { bar: number }) {}
->f1 : ({ ["bar"]: x }: { bar: number;}) => void
+>f1 : ({ ["bar"]: x }: { bar: number; }) => void
>"bar" : "bar"
>x : number
>bar : number
function f2({[foo]: x}: { bar: number }) {}
->f2 : ({ [foo]: x }: { bar: number;}) => void
+>f2 : ({ [foo]: x }: { bar: number; }) => void
>foo : string
>x : any
>bar : number
function f3({[foo2()]: x}: { bar: number }) {}
->f3 : ({ [foo2()]: x }: { bar: number;}) => void
+>f3 : ({ [foo2()]: x }: { bar: number; }) => void
>foo2() : string
>foo2 : () => string
>x : any
>bar : number
function f4([{[foo]: x}]: [{ bar: number }]) {}
->f4 : ([{ [foo]: x }]: [{ bar: number;}]) => void
+>f4 : ([{ [foo]: x }]: [{ bar: number; }]) => void
>foo : string
>x : any
>bar : number
function f5([{[foo2()]: x}]: [{ bar: number }]) {}
->f5 : ([{ [foo2()]: x }]: [{ bar: number;}]) => void
+>f5 : ([{ [foo2()]: x }]: [{ bar: number; }]) => void
>foo2() : string
>foo2 : () => string
>x : any
diff --git a/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types
index 03887183709b1..f9464ace1fe4c 100644
--- a/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types
+++ b/tests/baselines/reference/conditionalTypeAssignabilityWhenDeferred.types
@@ -19,7 +19,7 @@ function select<
>valueProp : TValueProp
export function func(x: XX, tipos: { value: XX }[]) {
->func : (x: XX, tipos: { value: XX;}[]) => void
+>func : (x: XX, tipos: { value: XX; }[]) => void
>x : XX
>tipos : { value: XX; }[]
>value : XX
@@ -100,7 +100,7 @@ function f(t: T) {
}
function f2(t1: { x: T; y: T }, t2: T extends T ? { x: T; y: T } : never) {
->f2 : (t1: { x: T; y: T;}, t2: T extends T ? { x: T; y: T;} : never) => void
+>f2 : (t1: { x: T; y: T; }, t2: T extends T ? { x: T; y: T; } : never) => void
>t1 : { x: T; y: T; }
>x : T
>y : T
diff --git a/tests/baselines/reference/conditionalTypeDoesntSpinForever.types b/tests/baselines/reference/conditionalTypeDoesntSpinForever.types
index 71522fb6f000e..ac88c81fcd6af 100644
--- a/tests/baselines/reference/conditionalTypeDoesntSpinForever.types
+++ b/tests/baselines/reference/conditionalTypeDoesntSpinForever.types
@@ -92,12 +92,12 @@ export enum PubSubRecordIsStoredInRedisAsA {
>storedAs : any
storedAsJsonEncodedRedisString: () => BuildPubSubRecordType;
->storedAsJsonEncodedRedisString : () => BuildPubSubRecordType
+>storedAsJsonEncodedRedisString : () => BuildPubSubRecordType
>storedAs : PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString
>PubSubRecordIsStoredInRedisAsA : any
storedRedisHash: () => BuildPubSubRecordType;
->storedRedisHash : () => BuildPubSubRecordType
+>storedRedisHash : () => BuildPubSubRecordType
>storedAs : PubSubRecordIsStoredInRedisAsA.redisHash
>PubSubRecordIsStoredInRedisAsA : any
}
@@ -288,12 +288,12 @@ export enum PubSubRecordIsStoredInRedisAsA {
>maxMsToWaitBeforePublishing : any
maxMsToWaitBeforePublishing: (t: number) => BuildPubSubRecordType,
->maxMsToWaitBeforePublishing : (t: number) => BuildPubSubRecordType
+>maxMsToWaitBeforePublishing : (t: number) => BuildPubSubRecordType
>t : number
>maxMsToWaitBeforePublishing : number
neverDelayPublishing: () => BuildPubSubRecordType,
->neverDelayPublishing : () => BuildPubSubRecordType
+>neverDelayPublishing : () => BuildPubSubRecordType
>maxMsToWaitBeforePublishing : 0
}
diff --git a/tests/baselines/reference/conditionalTypes1.js b/tests/baselines/reference/conditionalTypes1.js
index 667c4de7c09a4..b90f9f21605cc 100644
--- a/tests/baselines/reference/conditionalTypes1.js
+++ b/tests/baselines/reference/conditionalTypes1.js
@@ -649,7 +649,7 @@ type Foo = T extends string ? boolean : number;
type Bar = T extends string ? boolean : number;
declare const convert: (value: Foo) => Bar;
type Baz = Foo;
-declare const convert2: (value: Foo) => Foo;
+declare const convert2: (value: Foo) => Baz;
declare function f31(): void;
declare function f32(): void;
declare function f33(): void;
diff --git a/tests/baselines/reference/conditionalTypes1.types b/tests/baselines/reference/conditionalTypes1.types
index 5f9770492ded1..455c7f5291a57 100644
--- a/tests/baselines/reference/conditionalTypes1.types
+++ b/tests/baselines/reference/conditionalTypes1.types
@@ -136,7 +136,7 @@ type T15 = Extract; // never
>q : "a"
declare function f5(p: K): Extract;
->f5 : (p: K) => Extract
+>f5 : (p: K) => Extract
>p : K
>k : K
@@ -789,8 +789,8 @@ type Baz = Foo;
>Baz : Baz
const convert2 = (value: Foo): Baz => value;
->convert2 : (value: Foo) => Foo
->(value: Foo): Baz => value : (value: Foo) => Foo
+>convert2 : (value: Foo) => Baz
+>(value: Foo): Baz => value : (value: Foo) => Baz
>value : Foo
>value : Foo
diff --git a/tests/baselines/reference/conditionalTypes2.types b/tests/baselines/reference/conditionalTypes2.types
index 41b259a447daf..09597c2dbff7f 100644
--- a/tests/baselines/reference/conditionalTypes2.types
+++ b/tests/baselines/reference/conditionalTypes2.types
@@ -151,13 +151,13 @@ type Bar = { bar: string };
>bar : string
declare function fooBar(x: { foo: string, bar: string }): void;
->fooBar : (x: { foo: string; bar: string;}) => void
+>fooBar : (x: { foo: string; bar: string; }) => void
>x : { foo: string; bar: string; }
>foo : string
>bar : string
declare function fooBat(x: { foo: string, bat: string }): void;
->fooBat : (x: { foo: string; bat: string;}) => void
+>fooBat : (x: { foo: string; bat: string; }) => void
>x : { foo: string; bat: string; }
>foo : string
>bat : string
diff --git a/tests/baselines/reference/conditionalTypesSimplifyWhenTrivial.types b/tests/baselines/reference/conditionalTypesSimplifyWhenTrivial.types
index 46173b625832e..2f27a38d71b26 100644
--- a/tests/baselines/reference/conditionalTypesSimplifyWhenTrivial.types
+++ b/tests/baselines/reference/conditionalTypesSimplifyWhenTrivial.types
@@ -59,8 +59,8 @@ type ExcludeWithDefault = T extends U ? D : T;
>ExcludeWithDefault : ExcludeWithDefault
const fn5 = (
->fn5 : (params: Pick>) => Params
->( params: Pick>,): Params => params : (params: Pick>) => Params
+>fn5 : (params: Pick>) => Params
+>( params: Pick>,): Params => params : (params: Pick>) => Params
params: Pick>,
>params : Pick>
@@ -83,8 +83,8 @@ function fn6(x: ExcludeWithDefault) {
}
const fn7 = (
->fn7 : (params: Pick>) => Params
->( params: Pick>,): Params => params : (params: Pick>) => Params
+>fn7 : (params: Pick>) => Params
+>( params: Pick>,): Params => params : (params: Pick>) => Params
params: Pick>,
>params : Pick>
diff --git a/tests/baselines/reference/conflictingDeclarationsImportFromNamespace2.types b/tests/baselines/reference/conflictingDeclarationsImportFromNamespace2.types
index 21b55ae75a2ef..64be2e260dda2 100644
--- a/tests/baselines/reference/conflictingDeclarationsImportFromNamespace2.types
+++ b/tests/baselines/reference/conflictingDeclarationsImportFromNamespace2.types
@@ -9,7 +9,7 @@ declare module "./index" {
interface LoDashStatic {
pick: (
->pick : (object: T, ...props: U[]) => Pick
+>pick : (object: T, ...props: Array) => Pick
object: T,
>object : T
diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.types b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.types
index 0bed3a62c2184..839871188fc3f 100644
--- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.types
+++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.types
@@ -78,7 +78,7 @@ interface A { // T
>x : Derived[]
a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base;
->a11 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base
+>a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>x : { foo: string; }
>foo : string
>y : { foo: string; bar: string; }
@@ -96,7 +96,7 @@ interface A { // T
>y : Derived[]
a14: new (x: { a: string; b: number }) => Object;
->a14 : new (x: { a: string; b: number;}) => Object
+>a14 : new (x: { a: string; b: number; }) => Object
>x : { a: string; b: number; }
>a : string
>b : number
@@ -204,10 +204,10 @@ interface I extends A {
>r : T
a9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; // ok, same as a8 with compatible object literal
->a9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U
+>a9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
>x : (arg: T) => U
>arg : T
->y : (arg2: { foo: string; bing: number;}) => U
+>y : (arg2: { foo: string; bing: number; }) => U
>arg2 : { foo: string; bing: number; }
>foo : string
>bing : number
diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.types b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.types
index 05dd7752d4573..694d652e967c0 100644
--- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.types
+++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.types
@@ -52,7 +52,7 @@ module Errors {
>x : Base[]
a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base;
->a11 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base
+>a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>x : { foo: string; }
>foo : string
>y : { foo: string; bar: string; }
@@ -75,7 +75,7 @@ module Errors {
};
a15: new (x: { a: string; b: number }) => number;
->a15 : new (x: { a: string; b: number;}) => number
+>a15 : new (x: { a: string; b: number; }) => number
>x : { a: string; b: number; }
>a : string
>b : number
@@ -130,10 +130,10 @@ module Errors {
interface I4 extends A {
a8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch
->a8 : new (x: (arg: T) => U, y: (arg2: { foo: number;}) => U) => (r: T) => U
+>a8 : new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
>x : (arg: T) => U
>arg : T
->y : (arg2: { foo: number;}) => U
+>y : (arg2: { foo: number; }) => U
>arg2 : { foo: number; }
>foo : number
>r : T
diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.types b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.types
index 586f63a410f87..a8fddee385ca4 100644
--- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.types
+++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.types
@@ -79,7 +79,7 @@ interface A { // T
>x : Derived[]
a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base;
->a11 : new (x: { foo: string;}, y: { foo: string; bar: string;}) => Base
+>a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>x : { foo: string; }
>foo : string
>y : { foo: string; bar: string; }
@@ -97,7 +97,7 @@ interface A { // T
>y : Derived[]
a14: new (x: { a: string; b: number }) => Object;
->a14 : new (x: { a: string; b: number;}) => Object
+>a14 : new (x: { a: string; b: number; }) => Object
>x : { a: string; b: number; }
>a : string
>b : number
@@ -154,10 +154,10 @@ interface I extends B {
>r : T
a9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; // ok, same as a8 with compatible object literal
->a9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number;}) => U) => (r: T) => U
+>a9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
>x : (arg: T) => U
>arg : T
->y : (arg2: { foo: string; bing: number;}) => U
+>y : (arg2: { foo: string; bing: number; }) => U
>arg2 : { foo: string; bing: number; }
>foo : string
>bing : number
diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.types b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.types
index 065dd2478a504..623aa21226b8f 100644
--- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.types
+++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.types
@@ -109,7 +109,7 @@ interface I5 extends A {
interface I7 extends A {
a11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base;
->a11 : new (x: { foo: T;}, y: { foo: U; bar: U; }) => Base
+>a11 : new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base
>x : { foo: T; }
>foo : T
>y : { foo: U; bar: U; }
@@ -119,7 +119,7 @@ interface I7 extends A {
interface I9 extends A {
a16: new (x: { a: T; b: T }) => T[];
->a16 : new (x: { a: T; b: T;}) => T[]
+>a16 : new (x: { a: T; b: T; }) => T[]
>x : { a: T; b: T; }
>a : T
>b : T
diff --git a/tests/baselines/reference/constructorAsType.types b/tests/baselines/reference/constructorAsType.types
index 9fdba02dc2587..f80999fef081f 100644
--- a/tests/baselines/reference/constructorAsType.types
+++ b/tests/baselines/reference/constructorAsType.types
@@ -2,7 +2,7 @@
=== constructorAsType.ts ===
var Person:new () => {name: string;} = function () {return {name:"joe"};};
->Person : new () => { name: string;}
+>Person : new () => { name: string; }
>name : string
>function () {return {name:"joe"};} : () => { name: string; }
>{name:"joe"} : { name: string; }
@@ -10,7 +10,7 @@ var Person:new () => {name: string;} = function () {return {name:"joe"};};
>"joe" : "joe"
var Person2:{new() : {name:string;};};
->Person2 : new () => { name: string;}
+>Person2 : new () => { name: string; }
>name : string
Person = Person2;
diff --git a/tests/baselines/reference/contextualOverloadListFromUnionWithPrimitiveNoImplicitAny.types b/tests/baselines/reference/contextualOverloadListFromUnionWithPrimitiveNoImplicitAny.types
index 39334a18c70f7..639b462729297 100644
--- a/tests/baselines/reference/contextualOverloadListFromUnionWithPrimitiveNoImplicitAny.types
+++ b/tests/baselines/reference/contextualOverloadListFromUnionWithPrimitiveNoImplicitAny.types
@@ -13,7 +13,7 @@ interface FullRule {
>validate : string | RegExp | Validate
normalize?: (match: {x: string}) => void;
->normalize : ((match: { x: string;}) => void) | undefined
+>normalize : ((match: { x: string; }) => void) | undefined
>match : { x: string; }
>x : string
}
diff --git a/tests/baselines/reference/contextualSignatureConditionalTypeInstantiationUsingDefault.types b/tests/baselines/reference/contextualSignatureConditionalTypeInstantiationUsingDefault.types
index 8c6780bfae1a0..45716ed622b06 100644
--- a/tests/baselines/reference/contextualSignatureConditionalTypeInstantiationUsingDefault.types
+++ b/tests/baselines/reference/contextualSignatureConditionalTypeInstantiationUsingDefault.types
@@ -20,7 +20,7 @@ type ActionFunction = (event: TEvent) => void;
>event : TEvent
declare function createMachine<
->createMachine : (config: { types?: TTypesMeta;}, implementations: TTypesMeta extends TypegenEnabled ? ActionFunction<{ type: "test";}> : ActionFunction<{ type: string;}>) => void
+>createMachine : (config: { types?: TTypesMeta; }, implementations: TTypesMeta extends TypegenEnabled ? ActionFunction<{ type: "test"; }> : ActionFunction<{ type: string; }>) => void
TTypesMeta extends TypegenEnabled | TypegenDisabled = TypegenDisabled
>(
diff --git a/tests/baselines/reference/contextualTypeFromJSDoc.types b/tests/baselines/reference/contextualTypeFromJSDoc.types
index 5230872e2f30b..a023f8621fca6 100644
--- a/tests/baselines/reference/contextualTypeFromJSDoc.types
+++ b/tests/baselines/reference/contextualTypeFromJSDoc.types
@@ -24,7 +24,7 @@ const arr = [
/** @return {Array<[string, {x?:number, y?:number}]>} */
function f() {
->f : () => Array<[string, { x?: number; y?: number;}]>
+>f : () => Array<[string, { x?: number; y?: number; }]>
return [
>[ ['a', { x: 1 }], ['b', { y: 2 }] ] : ([string, { x: number; }] | [string, { y: number; }])[]
diff --git a/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types b/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types
index 49aa2be3ac271..11a17613871c8 100644
--- a/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types
+++ b/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types
@@ -31,7 +31,7 @@ f("a", {
});
function g<
->g : (x: ({ a: string;} & { b: string;})[K], y: string) => void
+>g : (x: ({ a: string; } & { b: string; })[K], y: string) => void
K extends "a" | "b">(x: ({ a: string } & { b: string })[K], y: string) {
>x : ({ a: string; } & { b: string; })[K]
diff --git a/tests/baselines/reference/contextualTyping25.types b/tests/baselines/reference/contextualTyping25.types
index 93e0c92bfc600..4198bccfa836e 100644
--- a/tests/baselines/reference/contextualTyping25.types
+++ b/tests/baselines/reference/contextualTyping25.types
@@ -2,7 +2,7 @@
=== contextualTyping25.ts ===
function foo(param:{id:number;}){}; foo(<{id:number;}>({}));
->foo : (param: { id: number;}) => void
+>foo : (param: { id: number; }) => void
>param : { id: number; }
>id : number
>foo(<{id:number;}>({})) : void
diff --git a/tests/baselines/reference/contextualTyping26.types b/tests/baselines/reference/contextualTyping26.types
index cf7bd395409eb..17e1797ffa3c1 100644
--- a/tests/baselines/reference/contextualTyping26.types
+++ b/tests/baselines/reference/contextualTyping26.types
@@ -2,7 +2,7 @@
=== contextualTyping26.ts ===
function foo(param:{id:number;}){}; foo(<{id:number;}>({}));
->foo : (param: { id: number;}) => void
+>foo : (param: { id: number; }) => void
>param : { id: number; }
>id : number
>foo(<{id:number;}>({})) : void
diff --git a/tests/baselines/reference/contextualTyping27.types b/tests/baselines/reference/contextualTyping27.types
index 6a7a85d8c0242..6d40ba5cbc63b 100644
--- a/tests/baselines/reference/contextualTyping27.types
+++ b/tests/baselines/reference/contextualTyping27.types
@@ -2,7 +2,7 @@
=== contextualTyping27.ts ===
function foo(param:{id:number;}){}; foo(<{id:number;}>({}));
->foo : (param: { id: number;}) => void
+>foo : (param: { id: number; }) => void
>param : { id: number; }
>id : number
>foo(<{id:number;}>({})) : void
diff --git a/tests/baselines/reference/contextualTypingOfOptionalMembers.types b/tests/baselines/reference/contextualTypingOfOptionalMembers.types
index c6a325dafc27a..07b389f0b244a 100644
--- a/tests/baselines/reference/contextualTypingOfOptionalMembers.types
+++ b/tests/baselines/reference/contextualTypingOfOptionalMembers.types
@@ -174,7 +174,7 @@ interface ActionsObjectOr {
}
declare function App4>(props: Options["actions"] & { state: State }): JSX.Element;
->App4 : >(props: Options["actions"] & { state: State;}) => JSX.Element
+>App4 : >(props: Options["actions"] & { state: State; }) => JSX.Element
>props : (string | Actions) & { state: State; }
>state : State
>JSX : any
diff --git a/tests/baselines/reference/contextuallyTypedJsxChildren.types b/tests/baselines/reference/contextuallyTypedJsxChildren.types
index 3f0308bbf3be9..07ee50cd91457 100644
--- a/tests/baselines/reference/contextuallyTypedJsxChildren.types
+++ b/tests/baselines/reference/contextuallyTypedJsxChildren.types
@@ -17,7 +17,7 @@ declare namespace DropdownMenu {
}
interface PropsWithChildren extends BaseProps {
children(props: { onClose: () => void }): JSX.Element;
->children : (props: { onClose: () => void;}) => JSX.Element
+>children : (props: { onClose: () => void; }) => JSX.Element
>props : { onClose: () => void; }
>onClose : () => void
>JSX : any
diff --git a/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=false).types b/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=false).types
index f54c06194349f..674270763dac4 100644
--- a/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=false).types
+++ b/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=false).types
@@ -9,7 +9,7 @@ declare function match(cb: (value: T) => boolean): T;
>value : T
declare function foo(pos: { x?: number; y?: number }): boolean;
->foo : (pos: { x?: number; y?: number;}) => boolean
+>foo : (pos: { x?: number; y?: number; }) => boolean
>pos : { x?: number | undefined; y?: number | undefined; }
>x : number | undefined
>y : number | undefined
diff --git a/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=true).types b/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=true).types
index df0a98863d77e..da82a6d39556c 100644
--- a/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=true).types
+++ b/tests/baselines/reference/contextuallyTypedOptionalProperty(exactoptionalpropertytypes=true).types
@@ -9,7 +9,7 @@ declare function match(cb: (value: T) => boolean): T;
>value : T
declare function foo(pos: { x?: number; y?: number }): boolean;
->foo : (pos: { x?: number; y?: number;}) => boolean
+>foo : (pos: { x?: number; y?: number; }) => boolean
>pos : { x?: number; y?: number; }
>x : number | undefined
>y : number | undefined
diff --git a/tests/baselines/reference/contextuallyTypedParametersWithInitializers.types b/tests/baselines/reference/contextuallyTypedParametersWithInitializers.types
index e55c3685d7ab8..9f637bcb4a9c2 100644
--- a/tests/baselines/reference/contextuallyTypedParametersWithInitializers.types
+++ b/tests/baselines/reference/contextuallyTypedParametersWithInitializers.types
@@ -11,13 +11,13 @@ declare function id2 any>(input: T): T;
>input : T
declare function id3 any>(input: T): T;
->id3 : any>(input: T) => T
+>id3 : any>(input: T) => T
>x : { foo: any; }
>foo : any
>input : T
declare function id4 any>(input: T): T;
->id4 : any>(input: T) => T
+>id4 : any>(input: T) => T
>x : { foo?: number | undefined; }
>foo : number | undefined
>input : T
diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes01.types b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes01.types
index 382b8592ff7c3..785f69db001a4 100644
--- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes01.types
+++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes01.types
@@ -13,8 +13,8 @@ namespace JSX {
}
const FooComponent = (props: { foo: "A" | "B" | "C" }) => {props.foo};
->FooComponent : (props: { foo: "A" | "B" | "C";}) => JSX.Element
->(props: { foo: "A" | "B" | "C" }) => {props.foo} : (props: { foo: "A" | "B" | "C";}) => JSX.Element
+>FooComponent : (props: { foo: "A" | "B" | "C"; }) => JSX.Element
+>(props: { foo: "A" | "B" | "C" }) => {props.foo} : (props: { foo: "A" | "B" | "C"; }) => JSX.Element
>props : { foo: "A" | "B" | "C"; }
>foo : "A" | "B" | "C"
>{props.foo} : JSX.Element
diff --git a/tests/baselines/reference/controlFlowAliasing.types b/tests/baselines/reference/controlFlowAliasing.types
index b93de24a3aaf9..9184a3d22ed38 100644
--- a/tests/baselines/reference/controlFlowAliasing.types
+++ b/tests/baselines/reference/controlFlowAliasing.types
@@ -138,7 +138,7 @@ function f14(x: number | null | undefined): number | null {
}
function f15(obj: { readonly x: string | number }) {
->f15 : (obj: { readonly x: string | number;}) => void
+>f15 : (obj: { readonly x: string | number; }) => void
>obj : { readonly x: string | number; }
>x : string | number
@@ -163,7 +163,7 @@ function f15(obj: { readonly x: string | number }) {
}
function f16(obj: { readonly x: string | number }) {
->f16 : (obj: { readonly x: string | number;}) => void
+>f16 : (obj: { readonly x: string | number; }) => void
>obj : { readonly x: string | number; }
>x : string | number
@@ -249,7 +249,7 @@ function f18(obj: readonly [string | number]) {
}
function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
->f20 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void
+>f20 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void
>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }
>kind : "foo"
>foo : string
@@ -281,7 +281,7 @@ function f20(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
}
function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
->f21 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void
+>f21 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void
>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }
>kind : "foo"
>foo : string
@@ -313,7 +313,7 @@ function f21(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
}
function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
->f22 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void
+>f22 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void
>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }
>kind : "foo"
>foo : string
@@ -345,7 +345,7 @@ function f22(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
}
function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
->f23 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void
+>f23 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void
>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }
>kind : "foo"
>foo : string
@@ -382,7 +382,7 @@ function f23(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
}
function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
->f24 : (arg: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void
+>f24 : (arg: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void
>arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }
>kind : "foo"
>foo : string
@@ -418,7 +418,7 @@ function f24(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
}
function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
->f25 : (arg: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void
+>f25 : (arg: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void
>arg : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }
>kind : "foo"
>foo : string
@@ -454,8 +454,8 @@ function f25(arg: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
}
function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number } }) {
->f26 : (outer: { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; };}) => void
->outer : { readonly obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}; }
+>f26 : (outer: { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; }) => void
+>outer : { readonly obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; }
>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }
>kind : "foo"
>foo : string
@@ -493,8 +493,8 @@ function f26(outer: { readonly obj: { kind: 'foo', foo: string } | { kind: 'bar'
}
function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number } }) {
->f27 : (outer: { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; };}) => void
->outer : { obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}; }
+>f27 : (outer: { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; }) => void
+>outer : { obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }; }
>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }
>kind : "foo"
>foo : string
@@ -532,7 +532,7 @@ function f27(outer: { obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: nu
}
function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
->f28 : (obj?: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void
+>f28 : (obj?: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void
>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } | undefined
>kind : "foo"
>foo : string
@@ -642,7 +642,7 @@ function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
}
function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) {
->f32 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void
+>f32 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void
>obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }
>kind : "foo"
>foo : string
diff --git a/tests/baselines/reference/controlFlowArrays.types b/tests/baselines/reference/controlFlowArrays.types
index cdd4cd00b570c..980c9d8bd09c0 100644
--- a/tests/baselines/reference/controlFlowArrays.types
+++ b/tests/baselines/reference/controlFlowArrays.types
@@ -617,7 +617,7 @@ function f18() {
// Repro from #39470
declare function foo(arg: { val: number }[]): void;
->foo : (arg: { val: number;}[]) => void
+>foo : (arg: { val: number; }[]) => void
>arg : { val: number; }[]
>val : number
diff --git a/tests/baselines/reference/controlFlowGenericTypes.types b/tests/baselines/reference/controlFlowGenericTypes.types
index b5ebc7a07ee5b..615b1a5a5bd35 100644
--- a/tests/baselines/reference/controlFlowGenericTypes.types
+++ b/tests/baselines/reference/controlFlowGenericTypes.types
@@ -2,7 +2,7 @@
=== controlFlowGenericTypes.ts ===
function f1(x: T, y: { a: T }, z: [T]): string {
->f1 : (x: T, y: { a: T;}, z: [T]) => string
+>f1 : (x: T, y: { a: T; }, z: [T]) => string
>x : T
>y : { a: T; }
>a : T
diff --git a/tests/baselines/reference/controlFlowIterationErrorsAsync.types b/tests/baselines/reference/controlFlowIterationErrorsAsync.types
index eea08303e00e0..927e48e502602 100644
--- a/tests/baselines/reference/controlFlowIterationErrorsAsync.types
+++ b/tests/baselines/reference/controlFlowIterationErrorsAsync.types
@@ -348,7 +348,7 @@ async () => {
// repro #43047#issuecomment-874221939
declare function myQuery(input: { lastId: number | undefined }): Promise<{ entities: number[] }>;
->myQuery : (input: { lastId: number | undefined;}) => Promise<{ entities: number[];}>
+>myQuery : (input: { lastId: number | undefined; }) => Promise<{ entities: number[]; }>
>input : { lastId: number | undefined; }
>lastId : number | undefined
>entities : number[]
diff --git a/tests/baselines/reference/controlFlowOptionalChain.types b/tests/baselines/reference/controlFlowOptionalChain.types
index 2df13c173365a..065598377320d 100644
--- a/tests/baselines/reference/controlFlowOptionalChain.types
+++ b/tests/baselines/reference/controlFlowOptionalChain.types
@@ -321,8 +321,8 @@ o4.x.y;
>y : boolean
declare const o5: { x?: { y: { z?: { w: boolean } } } };
->o5 : { x?: { y: { z?: { w: boolean; };}; } | undefined; }
->x : { y: { z?: { w: boolean; };}; } | undefined
+>o5 : { x?: { y: { z?: { w: boolean; }; }; } | undefined; }
+>x : { y: { z?: { w: boolean; }; }; } | undefined
>y : { z?: { w: boolean; } | undefined; }
>z : { w: boolean; } | undefined
>w : boolean
diff --git a/tests/baselines/reference/correlatedUnions.js b/tests/baselines/reference/correlatedUnions.js
index 5335811054601..05e77d8b4d3e1 100644
--- a/tests/baselines/reference/correlatedUnions.js
+++ b/tests/baselines/reference/correlatedUnions.js
@@ -602,7 +602,7 @@ type SameKeys = {
};
};
type MappedFromOriginal = SameKeys;
-declare const getStringAndNumberFromOriginalAndMapped: (original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], SameKeys[K][N]];
+declare const getStringAndNumberFromOriginalAndMapped: (original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], MappedFromOriginal[K][N]];
interface Config {
string: string;
number: number;
diff --git a/tests/baselines/reference/correlatedUnions.types b/tests/baselines/reference/correlatedUnions.types
index 8d328d6c66f79..70cb53fee6925 100644
--- a/tests/baselines/reference/correlatedUnions.types
+++ b/tests/baselines/reference/correlatedUnions.types
@@ -797,8 +797,8 @@ type MappedFromOriginal = SameKeys;
>MappedFromOriginal : SameKeys
const getStringAndNumberFromOriginalAndMapped = <
->getStringAndNumberFromOriginalAndMapped : (original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], SameKeys[K][N]]
->< K extends KeyOfOriginal, N extends NestedKeyOfOriginalFor>( original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N): [Original[K][N], MappedFromOriginal[K][N]] => { return [original[key][nestedKey], mappedFromOriginal[key][nestedKey]];} : (original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], SameKeys[K][N]]
+>getStringAndNumberFromOriginalAndMapped : (original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], MappedFromOriginal[K][N]]
+>< K extends KeyOfOriginal, N extends NestedKeyOfOriginalFor>( original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N): [Original[K][N], MappedFromOriginal[K][N]] => { return [original[key][nestedKey], mappedFromOriginal[key][nestedKey]];} : (original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N) => [Original[K][N], MappedFromOriginal[K][N]]
K extends KeyOfOriginal,
N extends NestedKeyOfOriginalFor
diff --git a/tests/baselines/reference/declarationEmitAliasFromIndirectFile.types b/tests/baselines/reference/declarationEmitAliasFromIndirectFile.types
index 42423a730db8c..a3fc8a5898e5f 100644
--- a/tests/baselines/reference/declarationEmitAliasFromIndirectFile.types
+++ b/tests/baselines/reference/declarationEmitAliasFromIndirectFile.types
@@ -2,7 +2,7 @@
=== locale.d.ts ===
export type Locale = {
->Locale : { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string];}; }
+>Locale : { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }; }
weekdays: {
>weekdays : { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }
@@ -16,7 +16,7 @@ export type Locale = {
};
};
export type CustomLocale = {
->CustomLocale : { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string];}; }
+>CustomLocale : { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }; }
weekdays: {
>weekdays : { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }
diff --git a/tests/baselines/reference/declarationEmitDestructuring1.types b/tests/baselines/reference/declarationEmitDestructuring1.types
index 6c0947bf70628..d01785433f65c 100644
--- a/tests/baselines/reference/declarationEmitDestructuring1.types
+++ b/tests/baselines/reference/declarationEmitDestructuring1.types
@@ -14,7 +14,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
@@ -23,7 +23,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 7e957edd1194d..0998f1a5536d9 100644
--- a/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.types
+++ b/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.types
@@ -13,7 +13,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
diff --git a/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.types b/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.types
index db4441e8afd5e..029e8942c49a9 100644
--- a/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.types
+++ b/tests/baselines/reference/declarationEmitDestructuringWithOptionalBindingParameters.types
@@ -8,7 +8,7 @@ function foo([x,y,z]?: [string, number, boolean]) {
>z : boolean
}
function foo1( { x, y, z }?: { x: string; y: number; z: boolean }) {
->foo1 : ({ x, y, z }?: { x: string; y: number; z: boolean;}) => void
+>foo1 : ({ x, y, z }?: { x: string; y: number; z: boolean; }) => void
>x : string
>y : number
>z : boolean
diff --git a/tests/baselines/reference/declarationEmitDistributiveConditionalWithInfer.types b/tests/baselines/reference/declarationEmitDistributiveConditionalWithInfer.types
index b3f1ab2f1136b..ce30394a12254 100644
--- a/tests/baselines/reference/declarationEmitDistributiveConditionalWithInfer.types
+++ b/tests/baselines/reference/declarationEmitDistributiveConditionalWithInfer.types
@@ -7,7 +7,7 @@ export const fun = (
>( subFun: () => FlatArray[]) => { } : (subFun: () => (Collection[Field] extends readonly (infer InnerArr)[] ? InnerArr : Collection[Field])[]) => void
subFun: ()
->subFun : () => (Collection[Field] extends readonly (infer InnerArr)[] ? InnerArr : Collection[Field])[]
+>subFun : () => FlatArray[]
=> FlatArray[]) => { };
diff --git a/tests/baselines/reference/declarationEmitDuplicateParameterDestructuring.types b/tests/baselines/reference/declarationEmitDuplicateParameterDestructuring.types
index 2bdaf6c1a885f..f0fe0fac673af 100644
--- a/tests/baselines/reference/declarationEmitDuplicateParameterDestructuring.types
+++ b/tests/baselines/reference/declarationEmitDuplicateParameterDestructuring.types
@@ -2,8 +2,8 @@
=== declarationEmitDuplicateParameterDestructuring.ts ===
export const fn1 = ({ prop: a, prop: b }: { prop: number }) => a + b;
->fn1 : ({ prop: a, prop: b }: { prop: number;}) => number
->({ prop: a, prop: b }: { prop: number }) => a + b : ({ prop: a, prop: b }: { prop: number;}) => number
+>fn1 : ({ prop: a, prop: b }: { prop: number; }) => number
+>({ prop: a, prop: b }: { prop: number }) => a + b : ({ prop: a, prop: b }: { prop: number; }) => number
>prop : any
>a : number
>prop : any
@@ -14,8 +14,8 @@ export const fn1 = ({ prop: a, prop: b }: { prop: number }) => a + b;
>b : number
export const fn2 = ({ prop: a }: { prop: number }, { prop: b }: { prop: number }) => a + b;
->fn2 : ({ prop: a }: { prop: number;}, { prop: b }: { prop: number;}) => number
->({ prop: a }: { prop: number }, { prop: b }: { prop: number }) => a + b : ({ prop: a }: { prop: number;}, { prop: b }: { prop: number;}) => number
+>fn2 : ({ prop: a }: { prop: number; }, { prop: b }: { prop: number; }) => number
+>({ prop: a }: { prop: number }, { prop: b }: { prop: number }) => a + b : ({ prop: a }: { prop: number; }, { prop: b }: { prop: number; }) => number
>prop : any
>a : number
>prop : number
diff --git a/tests/baselines/reference/declarationEmitOptionalMethod.types b/tests/baselines/reference/declarationEmitOptionalMethod.types
index 695cd13177e22..3eb1e4af8f985 100644
--- a/tests/baselines/reference/declarationEmitOptionalMethod.types
+++ b/tests/baselines/reference/declarationEmitOptionalMethod.types
@@ -2,8 +2,8 @@
=== declarationEmitOptionalMethod.ts ===
export const Foo = (opts: {
->Foo : (opts: { a?(): void; b?: () => void;}) => { c?(): void; d?: () => void;}
->(opts: { a?(): void, b?: () => void,}): { c?(): void, d?: () => void,} => ({ }) : (opts: { a?(): void; b?: () => void;}) => { c?(): void; d?: () => void;}
+>Foo : (opts: { a?(): void; b?: () => void; }) => { c?(): void; d?: () => void; }
+>(opts: { a?(): void, b?: () => void,}): { c?(): void, d?: () => void,} => ({ }) : (opts: { a?(): void; b?: () => void; }) => { c?(): void; d?: () => void; }
>opts : { a?(): void; b?: (() => void) | undefined; }
a?(): void,
diff --git a/tests/baselines/reference/declarationEmitPrivatePromiseLikeInterface.js b/tests/baselines/reference/declarationEmitPrivatePromiseLikeInterface.js
index fca79b431ed2a..dec8e1bbe65e9 100644
--- a/tests/baselines/reference/declarationEmitPrivatePromiseLikeInterface.js
+++ b/tests/baselines/reference/declarationEmitPrivatePromiseLikeInterface.js
@@ -72,6 +72,6 @@ export interface HttpResponse ex
error: E;
}
export declare class HttpClient {
- request: () => TPromise, any>;
+ request: () => TPromise>;
}
export {};
diff --git a/tests/baselines/reference/declarationEmitReusesLambdaParameterNodes.js b/tests/baselines/reference/declarationEmitReusesLambdaParameterNodes.js
new file mode 100644
index 0000000000000..bbf4da08184d4
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitReusesLambdaParameterNodes.js
@@ -0,0 +1,26 @@
+//// [tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts] ////
+
+//// [index.d.ts]
+export type Whatever = {x: string, y: number};
+export type Props = Omit & Partial & T;
+
+//// [index.ts]
+import { Props } from "react-select";
+
+export const CustomSelect1 =