diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3fef78b1df9fb..6858ae40b5bec 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6306,7 +6306,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function isEntityNameVisible(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node): SymbolVisibilityResult { + function getMeaningOfEntityNameReference(entityName: EntityNameOrEntityNameExpression): SymbolFlags { // get symbol of the first identifier of the entityName let meaning: SymbolFlags; if ( @@ -6319,7 +6319,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } else if ( entityName.kind === SyntaxKind.QualifiedName || entityName.kind === SyntaxKind.PropertyAccessExpression || - entityName.parent.kind === SyntaxKind.ImportEqualsDeclaration + entityName.parent.kind === SyntaxKind.ImportEqualsDeclaration || + (entityName.parent.kind === SyntaxKind.QualifiedName && (entityName.parent as QualifiedName).left === entityName) || + (entityName.parent.kind === SyntaxKind.PropertyAccessExpression && (entityName.parent as PropertyAccessExpression).expression === entityName) || + (entityName.parent.kind === SyntaxKind.ElementAccessExpression && (entityName.parent as ElementAccessExpression).expression === entityName) ) { // Left identifier from type reference or TypeAlias // Entity name of the import declaration @@ -6329,7 +6332,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Type Reference or TypeAlias entity = Identifier meaning = SymbolFlags.Type; } + return meaning; + } + function isEntityNameVisible(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node): SymbolVisibilityResult { + const meaning = getMeaningOfEntityNameReference(entityName); const firstIdentifier = getFirstIdentifier(entityName); const symbol = resolveName(enclosingDeclaration, firstIdentifier.escapedText, meaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); if (symbol && symbol.flags & SymbolFlags.TypeParameter && meaning & SymbolFlags.Type) { @@ -8512,13 +8519,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { introducesError = true; return { introducesError, node }; } - const sym = resolveEntityName(leftmost, SymbolFlags.All, /*ignoreErrors*/ true, /*dontResolveAlias*/ true); + const meaning = getMeaningOfEntityNameReference(node); + const sym = resolveEntityName(leftmost, meaning, /*ignoreErrors*/ true, /*dontResolveAlias*/ true); if (sym) { - if (isSymbolAccessible(sym, context.enclosingDeclaration, SymbolFlags.All, /*shouldComputeAliasesToMakeVisible*/ false).accessibility !== SymbolAccessibility.Accessible) { + if (isSymbolAccessible(sym, context.enclosingDeclaration, meaning, /*shouldComputeAliasesToMakeVisible*/ false).accessibility !== SymbolAccessibility.Accessible) { introducesError = true; } else { - context.tracker.trackSymbol(sym, context.enclosingDeclaration, SymbolFlags.All); + context.tracker.trackSymbol(sym, context.enclosingDeclaration, meaning); includePrivateSymbol?.(sym); } if (isIdentifier(node)) { diff --git a/tests/baselines/reference/ParameterList5.types b/tests/baselines/reference/ParameterList5.types index e9dde482c5109..b51e74cab968d 100644 --- a/tests/baselines/reference/ParameterList5.types +++ b/tests/baselines/reference/ParameterList5.types @@ -2,6 +2,6 @@ === ParameterList5.ts === function A(): (public B) => C { ->A : () => (B: any) => C +>A : () => (public B) => C >B : any } diff --git a/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types b/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types index f257b2b453176..45267a2357356 100644 --- a/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types +++ b/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types @@ -4,7 +4,7 @@ // from webpack/lib/Compilation.js and filed at #26427 /** @param {{ [s: string]: number }} map */ function mappy(map) {} ->mappy : (map: { [s: string]: number; }) => void +>mappy : (map: { [s: string]: number;}) => void >map : { [s: string]: number; } export class C { diff --git a/tests/baselines/reference/anonterface.types b/tests/baselines/reference/anonterface.types index 74274684848d7..59405729860ad 100644 --- a/tests/baselines/reference/anonterface.types +++ b/tests/baselines/reference/anonterface.types @@ -8,7 +8,7 @@ module M { >C : C m(fn:{ (n:number):string; },n2:number):string { ->m : (fn: (n: number) => string, n2: number) => string +>m : (fn: { (n: number): string;}, n2: number) => string >fn : (n: number) => string >n : number >n2 : number diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.types b/tests/baselines/reference/anyAssignabilityInInheritance.types index b96b62e1af6c4..195958de39a4c 100644 --- a/tests/baselines/reference/anyAssignabilityInInheritance.types +++ b/tests/baselines/reference/anyAssignabilityInInheritance.types @@ -168,7 +168,7 @@ var r3 = foo3(a); // any >a : any declare function foo12(x: (x) => number): (x) => number; ->foo12 : { (x: (x: any) => number): (x: any) => number; (x: any): any; } +>foo12 : { (x: (x) => number): (x) => number; (x: any): any; } >x : (x: any) => number >x : any >x : any diff --git a/tests/baselines/reference/arrayLiteralContextualType.types b/tests/baselines/reference/arrayLiteralContextualType.types index 5af5173d6112b..d1608304a946c 100644 --- a/tests/baselines/reference/arrayLiteralContextualType.types +++ b/tests/baselines/reference/arrayLiteralContextualType.types @@ -35,7 +35,7 @@ function foo(animals: IAnimal[]) { } >animals : IAnimal[] function bar(animals: { [n: number]: IAnimal }) { } ->bar : (animals: { [n: number]: IAnimal; }) => void +>bar : (animals: { [n: number]: IAnimal;}) => void >animals : { [n: number]: IAnimal; } >n : number diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.types b/tests/baselines/reference/assignmentCompatWithCallSignatures3.types index c73ecb914c3bf..62cb6fadbe7de 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.types @@ -130,7 +130,7 @@ var a17: { }; var a18: { ->a18 : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; } +>a18 : { (x: { (a: number): number; (a: string): string;}): any[]; (x: { (a: boolean): boolean; (a: Date): Date;}): any[]; } (x: { >x : { (a: number): number; (a: string): string; } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.types b/tests/baselines/reference/assignmentCompatWithCallSignatures4.types index 8cb1642ff718e..ec644d70aa889 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.types @@ -81,7 +81,7 @@ module Errors { >b : number var a16: { ->a16 : { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; } +>a16 : { (x: { (a: number): number; (a?: number): number;}): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean;}): boolean[]; } (x: { >x : { (a: number): number; (a?: number): number; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types index 8bf8a3a79f3d8..02c9dddbcc30f 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types @@ -130,7 +130,7 @@ var a17: { }; var a18: { ->a18 : { new (x: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; } +>a18 : { new (x: { new (a: number): number; new (a: string): string;}): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date;}): any[]; } new (x: { >x : { new (a: number): number; new (a: string): string; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types index e854003d55ecc..d58c6ad783bdd 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types @@ -81,7 +81,7 @@ module Errors { >b : number var a16: { ->a16 : { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; } +>a16 : { new (x: { new (a: number): number; new (a?: number): number;}): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean;}): boolean[]; } new (x: { >x : { new (a: number): number; new (a?: number): number; } diff --git a/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.types b/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.types index a6bad3686e8a0..1873363c7dcee 100644 --- a/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.types +++ b/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.types @@ -104,7 +104,7 @@ h(async v => v ? (def) => { } : Promise.reject()); // repro from #29196 const increment: ( ->increment : (num: number, str: string) => string | Promise any)> +>increment : (num: number, str: string) => Promise<((s: string) => any) | string> | string num: number, >num : number @@ -130,7 +130,7 @@ const increment: ( } const increment2: ( ->increment2 : (num: number, str: string) => Promise any)> +>increment2 : (num: number, str: string) => Promise<((s: string) => any) | string> num: number, >num : number diff --git a/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.types b/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.types index cde481af55d4a..e0dadb0d89de0 100644 --- a/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.types +++ b/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.types @@ -4,7 +4,7 @@ declare namespace Windows.Foundation { interface IPromise { then(success?: (value: TResult) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; ->then : { (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => U_1) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => U_2) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => U_3) | undefined, error?: ((error: any) => U_3) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; } +>then : { (success?: (value: TResult) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => U_1) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => U_2) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => U_3) | undefined, error?: ((error: any) => U_3) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; } >success : ((value: TResult) => IPromise) | undefined >value : TResult >error : ((error: any) => IPromise) | undefined @@ -13,7 +13,7 @@ declare namespace Windows.Foundation { >progress : any then(success?: (value: TResult) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; ->then : { (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => U) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => U_2) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => U_3) | undefined, error?: ((error: any) => U_3) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; } +>then : { (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: (value: TResult) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: ((value: TResult) => U_2) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => U_3) | undefined, error?: ((error: any) => U_3) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; } >success : ((value: TResult) => IPromise) | undefined >value : TResult >error : ((error: any) => U) | undefined @@ -22,7 +22,7 @@ declare namespace Windows.Foundation { >progress : any then(success?: (value: TResult) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; ->then : { (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => U_2) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => U) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => U_3) | undefined, error?: ((error: any) => U_3) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; } +>then : { (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => U_2) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: (value: TResult) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: ((value: TResult) => U_3) | undefined, error?: ((error: any) => U_3) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; } >success : ((value: TResult) => U) | undefined >value : TResult >error : ((error: any) => IPromise) | undefined @@ -31,7 +31,7 @@ declare namespace Windows.Foundation { >progress : any then(success?: (value: TResult) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; ->then : { (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => U_2) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => U_3) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => U) | undefined, error?: ((error: any) => U) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; } +>then : { (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => IPromise) | undefined, error?: ((error: any) => U_2) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: ((value: TResult) => U_3) | undefined, error?: ((error: any) => IPromise) | undefined, progress?: ((progress: any) => void) | undefined): IPromise; (success?: (value: TResult) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } >success : ((value: TResult) => U) | undefined >value : TResult >error : ((error: any) => U) | undefined @@ -40,7 +40,7 @@ declare namespace Windows.Foundation { >progress : any done(success?: (value: TResult) => any, error?: (error: any) => any, progress?: (progress: any) => void): void; ->done : (success?: ((value: TResult) => any) | undefined, error?: ((error: any) => any) | undefined, progress?: ((progress: any) => void) | undefined) => void +>done : (success?: (value: TResult) => any, error?: (error: any) => any, progress?: (progress: any) => void) => void >success : ((value: TResult) => any) | undefined >value : TResult >error : ((error: any) => any) | undefined diff --git a/tests/baselines/reference/avoidNarrowingUsingConstVariableFromBindingElementWithLiteralInitializer.types b/tests/baselines/reference/avoidNarrowingUsingConstVariableFromBindingElementWithLiteralInitializer.types index 24155c1a02085..649ba1345430e 100644 --- a/tests/baselines/reference/avoidNarrowingUsingConstVariableFromBindingElementWithLiteralInitializer.types +++ b/tests/baselines/reference/avoidNarrowingUsingConstVariableFromBindingElementWithLiteralInitializer.types @@ -5,7 +5,7 @@ declare const foo: ["a", string, number] | ["b", string, boolean]; >foo : ["a", string, number] | ["b", string, boolean] export function test(arg: { index?: number }) { ->test : (arg: { index?: number | undefined; }) => void +>test : (arg: { index?: number;}) => void >arg : { index?: number | undefined; } >index : number | undefined diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types index 3e0c95356ae27..65468978985a7 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types @@ -134,7 +134,7 @@ interface A { // T }; a18: { ->a18 : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; } +>a18 : { (x: { (a: number): number; (a: string): string;}): any[]; (x: { (a: boolean): boolean; (a: Date): Date;}): any[]; } (x: { >x : { (a: number): number; (a: string): string; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types index 19516ba55bde1..33b648a0d18cb 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types @@ -81,7 +81,7 @@ module Errors { >b : number a16: { ->a16 : { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; } +>a16 : { (x: { (a: number): number; (a?: number): number;}): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean;}): boolean[]; } // type of parameter is overload set which means we can't do inference based on this type (x: { diff --git a/tests/baselines/reference/callsOnComplexSignatures.types b/tests/baselines/reference/callsOnComplexSignatures.types index 3a49fd91878ea..998394b702580 100644 --- a/tests/baselines/reference/callsOnComplexSignatures.types +++ b/tests/baselines/reference/callsOnComplexSignatures.types @@ -46,13 +46,13 @@ function test2() { interface Messages { readonly foo: (options: { [key: string]: any, b: number }) => string; ->foo : (options: { [key: string]: any; b: number; }) => string +>foo : (options: { [key: string]: any; b: number;}) => string >options : { [key: string]: any; b: number; } >key : string >b : number readonly bar: (options: { [key: string]: any, a: string }) => string; ->bar : (options: { [key: string]: any; a: string; }) => string +>bar : (options: { [key: string]: any; a: string;}) => string >options : { [key: string]: any; a: string; } >key : string >a : string diff --git a/tests/baselines/reference/collisionArgumentsInType.types b/tests/baselines/reference/collisionArgumentsInType.types index 044a9cbf3cbe5..e4afd2460f860 100644 --- a/tests/baselines/reference/collisionArgumentsInType.types +++ b/tests/baselines/reference/collisionArgumentsInType.types @@ -12,7 +12,7 @@ var v12: (arguments: number, ...restParameters) => void; // no error - no code g >restParameters : any[] var v2: { ->v2 : { (arguments: number, ...restParameters: any[]): any; new (arguments: number, ...restParameters: any[]): any; foo(arguments: number, ...restParameters: any[]): any; prop: (arguments: number, ...restParameters: any[]) => void; } +>v2 : { (arguments: number, ...restParameters: any[]): any; new (arguments: number, ...restParameters: any[]): any; foo(arguments: number, ...restParameters: any[]): any; prop: (arguments: number, ...restParameters) => void; } (arguments: number, ...restParameters); // no error - no code gen >arguments : number @@ -33,7 +33,7 @@ var v2: { >restParameters : any[] } var v21: { ->v21 : { (i: number, ...arguments: any[]): any; new (i: number, ...arguments: any[]): any; foo(i: number, ...arguments: any[]): any; prop: (i: number, ...arguments: any[]) => void; } +>v21 : { (i: number, ...arguments: any[]): any; new (i: number, ...arguments: any[]): any; foo(i: number, ...arguments: any[]): any; prop: (i: number, ...arguments) => void; } (i: number, ...arguments); // no error - no code gen >i : number diff --git a/tests/baselines/reference/collisionRestParameterInType.types b/tests/baselines/reference/collisionRestParameterInType.types index 11322dca66026..fb753a69e157d 100644 --- a/tests/baselines/reference/collisionRestParameterInType.types +++ b/tests/baselines/reference/collisionRestParameterInType.types @@ -7,7 +7,7 @@ var v1: (_i: number, ...restParameters) => void; // no error - no code gen >restParameters : any[] var v2: { ->v2 : { (_i: number, ...restParameters: any[]): any; new (_i: number, ...restParameters: any[]): any; foo(_i: number, ...restParameters: any[]): any; prop: (_i: number, ...restParameters: any[]) => void; } +>v2 : { (_i: number, ...restParameters: any[]): any; new (_i: number, ...restParameters: any[]): any; foo(_i: number, ...restParameters: any[]): any; prop: (_i: number, ...restParameters) => void; } (_i: number, ...restParameters); // no error - no code gen >_i : number diff --git a/tests/baselines/reference/complexRecursiveCollections.types b/tests/baselines/reference/complexRecursiveCollections.types index 8fbbe76f6d8bf..82552a83a1e86 100644 --- a/tests/baselines/reference/complexRecursiveCollections.types +++ b/tests/baselines/reference/complexRecursiveCollections.types @@ -418,12 +418,12 @@ declare module Immutable { >value : this merge(...collections: Array | {[key: string]: V}>): this; ->merge : (...collections: (Collection | { [key: string]: V; })[]) => this +>merge : (...collections: Array | { [key: string]: V;}>) => this >collections : (Collection | { [key: string]: V; })[] >key : string mergeWith(merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | {[key: string]: V}>): this; ->mergeWith : (merger: (oldVal: V, newVal: V, key: K) => V, ...collections: (Collection | { [key: string]: V; })[]) => this +>mergeWith : (merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | { [key: string]: V;}>) => this >merger : (oldVal: V, newVal: V, key: K) => V >oldVal : V >newVal : V @@ -432,12 +432,12 @@ declare module Immutable { >key : string mergeDeep(...collections: Array | {[key: string]: V}>): this; ->mergeDeep : (...collections: (Collection | { [key: string]: V; })[]) => this +>mergeDeep : (...collections: Array | { [key: string]: V;}>) => this >collections : (Collection | { [key: string]: V; })[] >key : string mergeDeepWith(merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | {[key: string]: V}>): this; ->mergeDeepWith : (merger: (oldVal: V, newVal: V, key: K) => V, ...collections: (Collection | { [key: string]: V; })[]) => this +>mergeDeepWith : (merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | { [key: string]: V;}>) => this >merger : (oldVal: V, newVal: V, key: K) => V >oldVal : V >newVal : V @@ -500,7 +500,7 @@ declare module Immutable { >collections : Iterable<[KC, VC]>[] concat(...collections: Array<{[key: string]: C}>): Map; ->concat : { (...collections: Iterable<[KC, VC]>[]): Map; (...collections: { [key: string]: C; }[]): Map; } +>concat : { (...collections: Iterable<[KC, VC]>[]): Map; (...collections: Array<{ [key: string]: C;}>): Map; } >collections : { [key: string]: C; }[] >key : string @@ -585,7 +585,7 @@ declare module Immutable { >collections : Iterable<[KC, VC]>[] concat(...collections: Array<{[key: string]: C}>): OrderedMap; ->concat : { (...collections: Iterable<[KC, VC]>[]): OrderedMap; (...collections: { [key: string]: C; }[]): OrderedMap; } +>concat : { (...collections: Iterable<[KC, VC]>[]): OrderedMap; (...collections: Array<{ [key: string]: C;}>): OrderedMap; } >collections : { [key: string]: C; }[] >key : string @@ -653,7 +653,7 @@ declare module Immutable { >iter : Collection function fromKeys(obj: {[key: string]: any}): Set; ->fromKeys : { (iter: Collection): Set; (obj: { [key: string]: any; }): Set; } +>fromKeys : { (iter: Collection): Set; (obj: { [key: string]: any;}): Set; } >obj : { [key: string]: any; } >key : string @@ -775,7 +775,7 @@ declare module Immutable { >iter : Collection function fromKeys(obj: {[key: string]: any}): OrderedSet; ->fromKeys : { (iter: Collection): OrderedSet; (obj: { [key: string]: any; }): OrderedSet; } +>fromKeys : { (iter: Collection): OrderedSet; (obj: { [key: string]: any;}): OrderedSet; } >obj : { [key: string]: any; } >key : string } @@ -1156,7 +1156,7 @@ declare module Immutable { >Seq : any export function Keyed(obj: {[key: string]: V}): Seq.Keyed; ->Keyed : { (collection: Iterable<[K, V_1]>): Keyed; (obj: { [key: string]: V; }): Seq.Keyed; (): Keyed; (): Keyed; } +>Keyed : { (collection: Iterable<[K, V_1]>): Keyed; (obj: { [key: string]: V;}): Seq.Keyed; (): Keyed; (): Keyed; } >obj : { [key: string]: V; } >key : string >Seq : any @@ -1176,7 +1176,7 @@ declare module Immutable { >toJS : () => Object toJSON(): { [key: string]: V }; ->toJSON : () => { [key: string]: V; } +>toJSON : () => { [key: string]: V;} >key : string toSeq(): this; @@ -1188,7 +1188,7 @@ declare module Immutable { >Seq : any concat(...collections: Array<{[key: string]: C}>): Seq.Keyed; ->concat : { (...collections: Iterable<[KC, VC]>[]): Keyed; (...collections: { [key: string]: C; }[]): Seq.Keyed; } +>concat : { (...collections: Iterable<[KC, VC]>[]): Keyed; (...collections: Array<{ [key: string]: C;}>): Seq.Keyed; } >collections : { [key: string]: C; }[] >key : string >Seq : any @@ -1500,7 +1500,7 @@ declare module Immutable { >Collection : any export function Keyed(obj: {[key: string]: V}): Collection.Keyed; ->Keyed : { (collection: Iterable<[K, V_1]>): Keyed; (obj: { [key: string]: V; }): Collection.Keyed; } +>Keyed : { (collection: Iterable<[K, V_1]>): Keyed; (obj: { [key: string]: V;}): Collection.Keyed; } >obj : { [key: string]: V; } >key : string >Collection : any @@ -1510,7 +1510,7 @@ declare module Immutable { >toJS : () => Object toJSON(): { [key: string]: V }; ->toJSON : () => { [key: string]: V; } +>toJSON : () => { [key: string]: V;} >key : string toSeq(): Seq.Keyed; @@ -1527,7 +1527,7 @@ declare module Immutable { >Collection : any concat(...collections: Array<{[key: string]: C}>): Collection.Keyed; ->concat : { (...collections: Iterable<[KC, VC]>[]): Keyed; (...collections: { [key: string]: C; }[]): Collection.Keyed; } +>concat : { (...collections: Iterable<[KC, VC]>[]): Keyed; (...collections: Array<{ [key: string]: C;}>): Collection.Keyed; } >collections : { [key: string]: C; }[] >key : string >Collection : any @@ -1875,18 +1875,18 @@ declare module Immutable { // Conversion to JavaScript types toJS(): Array | { [key: string]: any }; ->toJS : () => any[] | { [key: string]: any; } +>toJS : () => Array | { [key: string]: any;} >key : string toJSON(): Array | { [key: string]: V }; ->toJSON : () => V[] | { [key: string]: V; } +>toJSON : () => Array | { [key: string]: V;} >key : string toArray(): Array; >toArray : () => Array toObject(): { [key: string]: V }; ->toObject : () => { [key: string]: V; } +>toObject : () => { [key: string]: V;} >key : string // Conversion to Collections diff --git a/tests/baselines/reference/complicatedPrivacy.types b/tests/baselines/reference/complicatedPrivacy.types index c43b086d817f3..c8e8e522759a5 100644 --- a/tests/baselines/reference/complicatedPrivacy.types +++ b/tests/baselines/reference/complicatedPrivacy.types @@ -52,7 +52,7 @@ module m1 { } export function f3(): { ->f3 : () => (a: number) => C1 +>f3 : () => { (a: number): C1;} (a: number) : C1; >a : number @@ -74,7 +74,7 @@ module m1 { export function f5(arg2: { ->f5 : (arg2: new (arg1: C1) => C1) => void +>f5 : (arg2: { new (arg1: C1): C1;}) => void >arg2 : new (arg1: C1) => C1 new (arg1: C1) : C1 diff --git a/tests/baselines/reference/computedPropertyNames48_ES5.types b/tests/baselines/reference/computedPropertyNames48_ES5.types index a55489c7bda34..2d34a248f4268 100644 --- a/tests/baselines/reference/computedPropertyNames48_ES5.types +++ b/tests/baselines/reference/computedPropertyNames48_ES5.types @@ -2,7 +2,7 @@ === computedPropertyNames48_ES5.ts === declare function extractIndexer(p: { [n: number]: T }): T; ->extractIndexer : (p: { [n: number]: T; }) => T +>extractIndexer : (p: { [n: number]: T;}) => T >p : { [n: number]: T; } >n : number diff --git a/tests/baselines/reference/computedPropertyNames48_ES6.types b/tests/baselines/reference/computedPropertyNames48_ES6.types index d34121937baff..db27fafd2664f 100644 --- a/tests/baselines/reference/computedPropertyNames48_ES6.types +++ b/tests/baselines/reference/computedPropertyNames48_ES6.types @@ -2,7 +2,7 @@ === computedPropertyNames48_ES6.ts === declare function extractIndexer(p: { [n: number]: T }): T; ->extractIndexer : (p: { [n: number]: T; }) => T +>extractIndexer : (p: { [n: number]: T;}) => T >p : { [n: number]: T; } >n : number diff --git a/tests/baselines/reference/conditionalTypeBasedContextualTypeReturnTypeWidening.types b/tests/baselines/reference/conditionalTypeBasedContextualTypeReturnTypeWidening.types index 67e4c763b30fb..6922ad1d6a5d8 100644 --- a/tests/baselines/reference/conditionalTypeBasedContextualTypeReturnTypeWidening.types +++ b/tests/baselines/reference/conditionalTypeBasedContextualTypeReturnTypeWidening.types @@ -6,7 +6,7 @@ declare function useState1(initialState: (S extends (() => any) ? never : S) >initialState : (S extends () => any ? never : S) | (() => S) declare function useState2(initialState: (S extends ((...args: any[]) => any) ? never : S) | (() => S)): S; // Any args ->useState2 : (initialState: (S extends (...args: any[]) => any ? never : S) | (() => S)) => S +>useState2 : (initialState: (S extends ((...args: any[]) => any) ? never : S) | (() => S)) => S >initialState : (S extends (...args: any[]) => any ? never : S) | (() => S) >args : any[] @@ -31,7 +31,7 @@ declare function useState3(initialState: (T extends (() => any) >initialState : (T extends () => any ? never : T) | (() => S) declare function useState4(initialState: (T extends ((...args: any[]) => any) ? never : T) | (() => S)): S; // Any args ->useState4 : (initialState: (T extends (...args: any[]) => any ? never : T) | (() => S)) => S +>useState4 : (initialState: (T extends ((...args: any[]) => any) ? never : T) | (() => S)) => S >initialState : (T extends (...args: any[]) => any ? never : T) | (() => S) >args : any[] diff --git a/tests/baselines/reference/constraintWithIndexedAccess.types b/tests/baselines/reference/constraintWithIndexedAccess.types index c448e08e22320..e3f595d5095ed 100644 --- a/tests/baselines/reference/constraintWithIndexedAccess.types +++ b/tests/baselines/reference/constraintWithIndexedAccess.types @@ -3,7 +3,7 @@ === constraintWithIndexedAccess.ts === // #52399 type DataFetchFns = { ->DataFetchFns : { Boat: { requiresLicense: (id: string) => boolean; maxGroundSpeed: (id: string) => number; description: (id: string) => string; displacement: (id: string) => number; name: (id: string) => string; }; Plane: { requiresLicense: (id: string) => boolean; maxGroundSpeed: (id: string) => number; maxTakeoffWeight: (id: string) => number; maxCruisingAltitude: (id: string) => number; name: (id: string) => string; }; } +>DataFetchFns : { Boat: { requiresLicense: (id: string) => boolean; maxGroundSpeed: (id: string) => number; description: (id: string) => string; displacement: (id: string) => number; name: (id: string) => string;}; Plane: { requiresLicense: (id: string) => boolean; maxGroundSpeed: (id: string) => number; maxTakeoffWeight: (id: string) => number; maxCruisingAltitude: (id: string) => number; name: (id: string) => string;}; } Boat: { >Boat : { requiresLicense: (id: string) => boolean; maxGroundSpeed: (id: string) => number; description: (id: string) => string; displacement: (id: string) => number; name: (id: string) => string; } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.types b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.types index 2ff0dba4385c1..53d47fecbc1a2 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.types +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.types @@ -134,7 +134,7 @@ interface A { // T }; a18: { ->a18 : { new (x: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; } +>a18 : { new (x: { new (a: number): number; new (a: string): string;}): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date;}): any[]; } new (x: { >x : { new (a: number): number; new (a: string): string; } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.types b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.types index e342e13f9b931..a97e1f409ea18 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.types +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.types @@ -81,7 +81,7 @@ module Errors { >b : number a16: { ->a16 : { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; } +>a16 : { new (x: { new (a: number): number; new (a?: number): number;}): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean;}): boolean[]; } // type of parameter is overload set which means we can't do inference based on this type new (x: { diff --git a/tests/baselines/reference/contextualReturnTypeOfIIFE3.types b/tests/baselines/reference/contextualReturnTypeOfIIFE3.types index 002881a35da44..93ebf51cc6a53 100644 --- a/tests/baselines/reference/contextualReturnTypeOfIIFE3.types +++ b/tests/baselines/reference/contextualReturnTypeOfIIFE3.types @@ -5,7 +5,7 @@ declare namespace app { >app : typeof app var foo: { ->foo : { bar: { someFun: (arg: number) => void; }; } +>foo : { bar: { someFun: (arg: number) => void;}; } bar: { >bar : { someFun: (arg: number) => void; } diff --git a/tests/baselines/reference/contextualSignatureInArrayElementLibEs2015.types b/tests/baselines/reference/contextualSignatureInArrayElementLibEs2015.types index b5a202c16ed61..e159a9aa5b4cd 100644 --- a/tests/baselines/reference/contextualSignatureInArrayElementLibEs2015.types +++ b/tests/baselines/reference/contextualSignatureInArrayElementLibEs2015.types @@ -4,7 +4,7 @@ // See: https://github.com/microsoft/TypeScript/pull/53280#discussion_r1138684984 declare function test( ->test : (arg: Record void> | ((arg: number) => void)[]) => void +>test : (arg: Record void> | Array<(arg: number) => void>) => void arg: Record void> | Array<(arg: number) => void> >arg : Record void> | ((arg: number) => void)[] diff --git a/tests/baselines/reference/contextualSignatureInArrayElementLibEs5.types b/tests/baselines/reference/contextualSignatureInArrayElementLibEs5.types index 5b4a4cc65891b..93c92a5ebf257 100644 --- a/tests/baselines/reference/contextualSignatureInArrayElementLibEs5.types +++ b/tests/baselines/reference/contextualSignatureInArrayElementLibEs5.types @@ -4,7 +4,7 @@ // See: https://github.com/microsoft/TypeScript/pull/53280#discussion_r1138684984 declare function test( ->test : (arg: Record void> | ((arg: number) => void)[]) => void +>test : (arg: Record void> | Array<(arg: number) => void>) => void arg: Record void> | Array<(arg: number) => void> >arg : Record void> | ((arg: number) => void)[] diff --git a/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types b/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types index 49aa2be3ac271..7b6ea19ac5998 100644 --- a/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types +++ b/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types @@ -5,7 +5,7 @@ type Keys = "a" | "b"; >Keys : "a" | "b" type OptionsForKey = { a: { cb: (p: number) => number } } & { b: {} }; ->OptionsForKey : { a: { cb: (p: number) => number; }; } & { b: {}; } +>OptionsForKey : { a: { cb: (p: number) => number;}; } & { b: {}; } >a : { cb: (p: number) => number; } >cb : (p: number) => number >p : number diff --git a/tests/baselines/reference/contextualTypeOnYield1.types b/tests/baselines/reference/contextualTypeOnYield1.types index abca3a3176923..422e6dddade25 100644 --- a/tests/baselines/reference/contextualTypeOnYield1.types +++ b/tests/baselines/reference/contextualTypeOnYield1.types @@ -2,7 +2,7 @@ === contextualTypeOnYield1.ts === type FuncOrGeneratorFunc = () => (number | Generator<(arg: number) => void, any, void>) ->FuncOrGeneratorFunc : () => number | Generator<(arg: number) => void, any, void> +>FuncOrGeneratorFunc : () => (number | Generator<(arg: number) => void, any, void>) >arg : number const f: FuncOrGeneratorFunc = function*() { diff --git a/tests/baselines/reference/contextualTypeOnYield2.types b/tests/baselines/reference/contextualTypeOnYield2.types index 0d54bdf7dd790..38c097b4d2d8e 100644 --- a/tests/baselines/reference/contextualTypeOnYield2.types +++ b/tests/baselines/reference/contextualTypeOnYield2.types @@ -2,7 +2,7 @@ === contextualTypeOnYield2.ts === type OrGen = () => (number | Generator void, undefined>); ->OrGen : () => number | Generator void, undefined> +>OrGen : () => (number | Generator void, undefined>) >arg : number const g: OrGen = function* () { diff --git a/tests/baselines/reference/contextualTyping.types b/tests/baselines/reference/contextualTyping.types index 435a3ccce2802..3da7f32f34479 100644 --- a/tests/baselines/reference/contextualTyping.types +++ b/tests/baselines/reference/contextualTyping.types @@ -327,7 +327,7 @@ interface IPlaceHolder { } var objc8: { ->objc8 : { t1: (s: string) => string; t2: IFoo; t3: number[]; t4: () => IFoo; t5: (n: number) => IFoo; t6: (n: number, s: string) => IFoo; t7: (n: number, s: string) => number; t8: (n: number, s: string) => number; t9: number[][]; t10: IFoo[]; t11: ((n: number, s: string) => string)[]; t12: IBar; t13: IFoo; t14: IFoo; } +>objc8 : { t1: (s: string) => string; t2: IFoo; t3: number[]; t4: () => IFoo; t5: (n: number) => IFoo; t6: (n: number, s: string) => IFoo; t7: { (n: number, s: string): number;}; t8: (n: number, s: string) => number; t9: number[][]; t10: IFoo[]; t11: { (n: number, s: string): string;}[]; t12: IBar; t13: IFoo; t14: IFoo; } t1: (s: string) => string; >t1 : (s: string) => string diff --git a/tests/baselines/reference/contextualTyping23.types b/tests/baselines/reference/contextualTyping23.types index 2aa3139ae530e..6909452a3b648 100644 --- a/tests/baselines/reference/contextualTyping23.types +++ b/tests/baselines/reference/contextualTyping23.types @@ -2,7 +2,7 @@ === contextualTyping23.ts === var foo:(a:{():number; (i:number):number; })=>number; foo = function(a){return 5}; ->foo : (a: { (): number; (i: number): number; }) => number +>foo : (a: { (): number; (i: number): number;}) => number >a : { (): number; (i: number): number; } >i : number >foo = function(a){return 5} : (a: { (): number; (i: number): number; }) => number diff --git a/tests/baselines/reference/contextualTyping24.types b/tests/baselines/reference/contextualTyping24.types index 8e4b45d78565a..e00365599babd 100644 --- a/tests/baselines/reference/contextualTyping24.types +++ b/tests/baselines/reference/contextualTyping24.types @@ -2,7 +2,7 @@ === contextualTyping24.ts === var foo:(a:{():number; (i:number):number; })=>number; foo = function(this: void, a:string){return 5}; ->foo : (a: { (): number; (i: number): number; }) => number +>foo : (a: { (): number; (i: number): number;}) => number >a : { (): number; (i: number): number; } >i : number >foo = function(this: void, a:string){return 5} : (this: void, a: string) => number diff --git a/tests/baselines/reference/contextualTyping32.types b/tests/baselines/reference/contextualTyping32.types index 00e0c8821b8cb..666cec7af547d 100644 --- a/tests/baselines/reference/contextualTyping32.types +++ b/tests/baselines/reference/contextualTyping32.types @@ -2,7 +2,7 @@ === contextualTyping32.ts === function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return 4}]); ->foo : (param: { (): number; (i: number): number; }[]) => void +>foo : (param: { (): number; (i: number): number;}[]) => void >param : { (): number; (i: number): number; }[] >i : number >foo([function(){return 1;}, function(){return 4}]) : void diff --git a/tests/baselines/reference/contextualTyping33.types b/tests/baselines/reference/contextualTyping33.types index e575ca6d232da..c4ca89867a8ef 100644 --- a/tests/baselines/reference/contextualTyping33.types +++ b/tests/baselines/reference/contextualTyping33.types @@ -2,7 +2,7 @@ === contextualTyping33.ts === function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return "foo"}]); ->foo : (param: { (): number; (i: number): number; }[]) => void +>foo : (param: { (): number; (i: number): number;}[]) => void >param : { (): number; (i: number): number; }[] >i : number >foo([function(){return 1;}, function(){return "foo"}]) : void diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals.types b/tests/baselines/reference/contextualTypingOfObjectLiterals.types index a27bfba1cc990..732562feed36c 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals.types +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals.types @@ -22,7 +22,7 @@ obj1 = obj2; // Error - indexer doesn't match >obj2 : { x: string; } function f(x: { [s: string]: string }) { } ->f : (x: { [s: string]: string; }) => void +>f : (x: { [s: string]: string;}) => void >x : { [s: string]: string; } >s : string diff --git a/tests/baselines/reference/controlFlowAliasing.types b/tests/baselines/reference/controlFlowAliasing.types index ea5ee6edf01f3..502041f2fedb8 100644 --- a/tests/baselines/reference/controlFlowAliasing.types +++ b/tests/baselines/reference/controlFlowAliasing.types @@ -580,7 +580,7 @@ function f28(obj?: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) // Narrowing by aliased discriminant property access function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f30 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f30 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -612,7 +612,7 @@ function f30(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f31(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f31 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f31 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -673,7 +673,7 @@ function f32(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { } function f33(obj: { kind: 'foo', foo: string } | { kind: 'bar', bar: number }) { ->f33 : (obj: { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; }) => void +>f33 : (obj: { kind: 'foo'; foo: string;} | { kind: 'bar'; bar: number;}) => void >obj : { kind: 'foo'; foo: string; } | { kind: 'bar'; bar: number; } >kind : "foo" >foo : string @@ -809,7 +809,7 @@ class C11 { // Mixing of aliased discriminants and conditionals function f40(obj: { kind: 'foo', foo?: string } | { kind: 'bar', bar?: number }) { ->f40 : (obj: { kind: 'foo'; foo?: string | undefined; } | { kind: 'bar'; bar?: number | undefined; }) => void +>f40 : (obj: { kind: 'foo'; foo?: string;} | { kind: 'bar'; bar?: number;}) => void >obj : { kind: 'foo'; foo?: string | undefined; } | { kind: 'bar'; bar?: number | undefined; } >kind : "foo" >foo : string | undefined diff --git a/tests/baselines/reference/controlFlowDestructuringVariablesInTryCatch.types b/tests/baselines/reference/controlFlowDestructuringVariablesInTryCatch.types index e8c8848631f79..8198939b7e78b 100644 --- a/tests/baselines/reference/controlFlowDestructuringVariablesInTryCatch.types +++ b/tests/baselines/reference/controlFlowDestructuringVariablesInTryCatch.types @@ -8,7 +8,7 @@ declare function f2(): [b: string]; >f2 : () => [b: string] declare function f3(): { c: string }; ->f3 : () => { c: string; } +>f3 : () => { c: string;} >c : string try { diff --git a/tests/baselines/reference/controlFlowInOperator.types b/tests/baselines/reference/controlFlowInOperator.types index 7ef3c0fbd807e..30cc52d710ee0 100644 --- a/tests/baselines/reference/controlFlowInOperator.types +++ b/tests/baselines/reference/controlFlowInOperator.types @@ -75,7 +75,7 @@ if (d in c) { // repro from https://github.com/microsoft/TypeScript/issues/54790 function uniqueID_54790( ->uniqueID_54790 : (id: string | undefined, seenIDs: { [key: string]: string; }) => string +>uniqueID_54790 : (id: string | undefined, seenIDs: { [key: string]: string;}) => string id: string | undefined, >id : string diff --git a/tests/baselines/reference/controlFlowOptionalChain3.types b/tests/baselines/reference/controlFlowOptionalChain3.types index 2ef7dc502c01a..a225ecea9ad95 100644 --- a/tests/baselines/reference/controlFlowOptionalChain3.types +++ b/tests/baselines/reference/controlFlowOptionalChain3.types @@ -52,7 +52,7 @@ function test2(foo: Foo | undefined) { } function Test3({ foo }: { foo: Foo | undefined }) { ->Test3 : ({ foo }: { foo: Foo | undefined; }) => JSX.Element +>Test3 : ({ foo }: { foo: Foo | undefined;}) => JSX.Element >foo : Foo | undefined >foo : Foo | undefined diff --git a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.types b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.types index 08094cb05a401..8e5e3f6f67d1e 100644 --- a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.types +++ b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.types @@ -6,12 +6,12 @@ function f1(...args) { } >args : any[] function f2(x: (...args) => void) { } ->f2 : (x: (...args: any[]) => void) => void +>f2 : (x: (...args) => void) => void >x : (...args: any[]) => void >args : any[] function f3(x: { (...args): void }) { } ->f3 : (x: (...args: any[]) => void) => void +>f3 : (x: { (...args): void;}) => void >x : (...args: any[]) => void >args : any[] diff --git a/tests/baselines/reference/declarationEmitGlobalThisPreserved.types b/tests/baselines/reference/declarationEmitGlobalThisPreserved.types index d1df7e2f893fa..3c813484cc652 100644 --- a/tests/baselines/reference/declarationEmitGlobalThisPreserved.types +++ b/tests/baselines/reference/declarationEmitGlobalThisPreserved.types @@ -11,8 +11,8 @@ // Broken inference cases. export const a1 = (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN; ->a1 : (isNaN: (number: number) => boolean) => (number: number) => boolean ->(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN : (isNaN: (number: number) => boolean) => (number: number) => boolean +>a1 : (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN +>(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN : (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN >isNaN : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -23,8 +23,8 @@ export const a1 = (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => i >isNaN : (number: number) => boolean export const a2 = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN; ->a2 : (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean ->(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN : (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean +>a2 : (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN +>(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN : (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN >isNaN : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -41,8 +41,8 @@ export const a2 = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN >isNaN : (number: number) => boolean export const a3 = (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar; ->a3 : (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean ->(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar : (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean +>a3 : (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN +>(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar : (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN >isNaN : number >bar : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean @@ -54,8 +54,8 @@ export const a3 = (isNaN: number, bar: typeof globalThis.isNaN): typeof globalTh >bar : (number: number) => boolean export const a4 = (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN; ->a4 : (isNaN: number) => (number: number) => boolean ->(isNaN: number): typeof globalThis.isNaN => globalThis.isNaN : (isNaN: number) => (number: number) => boolean +>a4 : (isNaN: number) => typeof globalThis.isNaN +>(isNaN: number): typeof globalThis.isNaN => globalThis.isNaN : (isNaN: number) => typeof globalThis.isNaN >isNaN : number >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -65,12 +65,12 @@ export const a4 = (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN; >isNaN : (number: number) => boolean export const aObj = { ->aObj : { a1: (isNaN: (number: number) => boolean) => (number: number) => boolean; a2: (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean; a3: (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean; a4: (isNaN: number) => (number: number) => boolean; } ->{ a1: (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN, a2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN, a3: (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar, a4: (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN,} : { a1: (isNaN: (number: number) => boolean) => (number: number) => boolean; a2: (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean; a3: (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean; a4: (isNaN: number) => (number: number) => boolean; } +>aObj : { a1: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; a2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN; a3: (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN; a4: (isNaN: number) => typeof globalThis.isNaN; } +>{ a1: (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN, a2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN, a3: (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar, a4: (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN,} : { a1: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN; a2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN; a3: (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN; a4: (isNaN: number) => typeof globalThis.isNaN; } a1: (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN, ->a1 : (isNaN: (number: number) => boolean) => (number: number) => boolean ->(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN : (isNaN: (number: number) => boolean) => (number: number) => boolean +>a1 : (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN +>(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN : (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN >isNaN : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -81,8 +81,8 @@ export const aObj = { >isNaN : (number: number) => boolean a2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN, ->a2 : (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean ->(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN : (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean +>a2 : (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN +>(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN : (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN >isNaN : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -99,8 +99,8 @@ export const aObj = { >isNaN : (number: number) => boolean a3: (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar, ->a3 : (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean ->(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar : (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean +>a3 : (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN +>(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar : (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN >isNaN : number >bar : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean @@ -112,8 +112,8 @@ export const aObj = { >bar : (number: number) => boolean a4: (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN, ->a4 : (isNaN: number) => (number: number) => boolean ->(isNaN: number): typeof globalThis.isNaN => globalThis.isNaN : (isNaN: number) => (number: number) => boolean +>a4 : (isNaN: number) => typeof globalThis.isNaN +>(isNaN: number): typeof globalThis.isNaN => globalThis.isNaN : (isNaN: number) => typeof globalThis.isNaN >isNaN : number >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -132,8 +132,8 @@ export type a4oReturn = ReturnType>; >aObj : { a1: (isNaN: (number: number) => boolean) => (number: number) => boolean; a2: (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean; a3: (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean; a4: (isNaN: number) => (number: number) => boolean; } export const b1 = (isNaN: typeof globalThis.isNaN) => isNaN; ->b1 : (isNaN: (number: number) => boolean) => (number: number) => boolean ->(isNaN: typeof globalThis.isNaN) => isNaN : (isNaN: (number: number) => boolean) => (number: number) => boolean +>b1 : (isNaN: typeof globalThis.isNaN) => (number: number) => boolean +>(isNaN: typeof globalThis.isNaN) => isNaN : (isNaN: typeof globalThis.isNaN) => (number: number) => boolean >isNaN : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -141,8 +141,8 @@ export const b1 = (isNaN: typeof globalThis.isNaN) => isNaN; >isNaN : (number: number) => boolean export const b2 = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => bar ?? isNaN; ->b2 : (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean ->(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => bar ?? isNaN : (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean +>b2 : (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => (number: number) => boolean +>(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => bar ?? isNaN : (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => (number: number) => boolean >isNaN : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -156,8 +156,8 @@ export const b2 = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN >isNaN : (number: number) => boolean export const b3 = (isNaN: number, bar: typeof globalThis.isNaN) => bar; ->b3 : (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean ->(isNaN: number, bar: typeof globalThis.isNaN) => bar : (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean +>b3 : (isNaN: number, bar: typeof globalThis.isNaN) => (number: number) => boolean +>(isNaN: number, bar: typeof globalThis.isNaN) => bar : (isNaN: number, bar: typeof globalThis.isNaN) => (number: number) => boolean >isNaN : number >bar : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean @@ -174,12 +174,12 @@ export const b4 = (isNaN: number) => globalThis.isNaN; >isNaN : (number: number) => boolean export const bObj = { ->bObj : { b1: (isNaN: (number: number) => boolean) => (number: number) => boolean; b2: (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean; b3: (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean; b4: (isNaN: number) => (number: number) => boolean; } ->{ b1: (isNaN: typeof globalThis.isNaN) => isNaN, b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => bar ?? isNaN, b3: (isNaN: number, bar: typeof globalThis.isNaN) => bar, b4: (isNaN: number) => globalThis.isNaN,} : { b1: (isNaN: (number: number) => boolean) => (number: number) => boolean; b2: (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean; b3: (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean; b4: (isNaN: number) => (number: number) => boolean; } +>bObj : { b1: (isNaN: typeof globalThis.isNaN) => (number: number) => boolean; b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => (number: number) => boolean; b3: (isNaN: number, bar: typeof globalThis.isNaN) => (number: number) => boolean; b4: (isNaN: number) => (number: number) => boolean; } +>{ b1: (isNaN: typeof globalThis.isNaN) => isNaN, b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => bar ?? isNaN, b3: (isNaN: number, bar: typeof globalThis.isNaN) => bar, b4: (isNaN: number) => globalThis.isNaN,} : { b1: (isNaN: typeof globalThis.isNaN) => (number: number) => boolean; b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => (number: number) => boolean; b3: (isNaN: number, bar: typeof globalThis.isNaN) => (number: number) => boolean; b4: (isNaN: number) => (number: number) => boolean; } b1: (isNaN: typeof globalThis.isNaN) => isNaN, ->b1 : (isNaN: (number: number) => boolean) => (number: number) => boolean ->(isNaN: typeof globalThis.isNaN) => isNaN : (isNaN: (number: number) => boolean) => (number: number) => boolean +>b1 : (isNaN: typeof globalThis.isNaN) => (number: number) => boolean +>(isNaN: typeof globalThis.isNaN) => isNaN : (isNaN: typeof globalThis.isNaN) => (number: number) => boolean >isNaN : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -187,8 +187,8 @@ export const bObj = { >isNaN : (number: number) => boolean b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => bar ?? isNaN, ->b2 : (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean ->(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => bar ?? isNaN : (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean +>b2 : (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => (number: number) => boolean +>(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => bar ?? isNaN : (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => (number: number) => boolean >isNaN : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -202,8 +202,8 @@ export const bObj = { >isNaN : (number: number) => boolean b3: (isNaN: number, bar: typeof globalThis.isNaN) => bar, ->b3 : (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean ->(isNaN: number, bar: typeof globalThis.isNaN) => bar : (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean +>b3 : (isNaN: number, bar: typeof globalThis.isNaN) => (number: number) => boolean +>(isNaN: number, bar: typeof globalThis.isNaN) => bar : (isNaN: number, bar: typeof globalThis.isNaN) => (number: number) => boolean >isNaN : number >bar : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean @@ -267,11 +267,11 @@ export function c4(isNaN: number) { return globalThis.isNaN; } >isNaN : (number: number) => boolean export const cObj = { ->cObj : { c1(isNaN: (number: number) => boolean): (number: number) => boolean; c2(isNaN: (number: number) => boolean, bar?: (number: number) => boolean): (number: number) => boolean; c3(isNaN: number, bar: (number: number) => boolean): (number: number) => boolean; c4(isNaN: number): (number: number) => boolean; } ->{ c1(isNaN: typeof globalThis.isNaN) { return isNaN }, c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) { return bar ?? isNaN }, c3(isNaN: number, bar: typeof globalThis.isNaN) { return bar }, c4(isNaN: number) { return globalThis.isNaN; },} : { c1(isNaN: (number: number) => boolean): (number: number) => boolean; c2(isNaN: (number: number) => boolean, bar?: (number: number) => boolean): (number: number) => boolean; c3(isNaN: number, bar: (number: number) => boolean): (number: number) => boolean; c4(isNaN: number): (number: number) => boolean; } +>cObj : { c1(isNaN: typeof globalThis.isNaN): (number: number) => boolean; c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): (number: number) => boolean; c3(isNaN: number, bar: typeof globalThis.isNaN): (number: number) => boolean; c4(isNaN: number): (number: number) => boolean; } +>{ c1(isNaN: typeof globalThis.isNaN) { return isNaN }, c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) { return bar ?? isNaN }, c3(isNaN: number, bar: typeof globalThis.isNaN) { return bar }, c4(isNaN: number) { return globalThis.isNaN; },} : { c1(isNaN: typeof globalThis.isNaN): (number: number) => boolean; c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): (number: number) => boolean; c3(isNaN: number, bar: typeof globalThis.isNaN): (number: number) => boolean; c4(isNaN: number): (number: number) => boolean; } c1(isNaN: typeof globalThis.isNaN) { return isNaN }, ->c1 : (isNaN: (number: number) => boolean) => (number: number) => boolean +>c1 : (isNaN: typeof globalThis.isNaN) => (number: number) => boolean >isNaN : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -279,7 +279,7 @@ export const cObj = { >isNaN : (number: number) => boolean c2(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) { return bar ?? isNaN }, ->c2 : (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean +>c2 : (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => (number: number) => boolean >isNaN : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -293,7 +293,7 @@ export const cObj = { >isNaN : (number: number) => boolean c3(isNaN: number, bar: typeof globalThis.isNaN) { return bar }, ->c3 : (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean +>c3 : (isNaN: number, bar: typeof globalThis.isNaN) => (number: number) => boolean >isNaN : number >bar : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean @@ -318,11 +318,11 @@ export type c4oReturn = ReturnType>; >cObj : { c1(isNaN: (number: number) => boolean): (number: number) => boolean; c2(isNaN: (number: number) => boolean, bar?: (number: number) => boolean): (number: number) => boolean; c3(isNaN: number, bar: (number: number) => boolean): (number: number) => boolean; c4(isNaN: number): (number: number) => boolean; } export function d1() { ->d1 : () => () => (isNaN: (number: number) => boolean) => (number: number) => boolean +>d1 : () => () => (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN const fn = (isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN; ->fn : (isNaN: (number: number) => boolean) => (number: number) => boolean ->(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN : (isNaN: (number: number) => boolean) => (number: number) => boolean +>fn : (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN +>(isNaN: typeof globalThis.isNaN): typeof globalThis.isNaN => isNaN : (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN >isNaN : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -338,11 +338,11 @@ export function d1() { } export function d2() { ->d2 : () => () => (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean +>d2 : () => () => (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN const fn = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN; ->fn : (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean ->(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN : (isNaN: (number: number) => boolean, bar?: (number: number) => boolean) => (number: number) => boolean +>fn : (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN +>(isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN): typeof globalThis.isNaN => bar ?? isNaN : (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN >isNaN : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis @@ -364,11 +364,11 @@ export function d2() { } export function d3() { ->d3 : () => () => (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean +>d3 : () => () => (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN const fn = (isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar; ->fn : (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean ->(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar : (isNaN: number, bar: (number: number) => boolean) => (number: number) => boolean +>fn : (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN +>(isNaN: number, bar: typeof globalThis.isNaN): typeof globalThis.isNaN => bar : (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN >isNaN : number >bar : (number: number) => boolean >globalThis.isNaN : (number: number) => boolean @@ -385,11 +385,11 @@ export function d3() { } export function d4() { ->d4 : () => () => (isNaN: number) => (number: number) => boolean +>d4 : () => () => (isNaN: number) => typeof globalThis.isNaN const fn = (isNaN: number): typeof globalThis.isNaN => globalThis.isNaN; ->fn : (isNaN: number) => (number: number) => boolean ->(isNaN: number): typeof globalThis.isNaN => globalThis.isNaN : (isNaN: number) => (number: number) => boolean +>fn : (isNaN: number) => typeof globalThis.isNaN +>(isNaN: number): typeof globalThis.isNaN => globalThis.isNaN : (isNaN: number) => typeof globalThis.isNaN >isNaN : number >globalThis.isNaN : (number: number) => boolean >globalThis : typeof globalThis diff --git a/tests/baselines/reference/declarationEmitRetainedAnnotationRetainsImportInOutput.js b/tests/baselines/reference/declarationEmitRetainedAnnotationRetainsImportInOutput.js new file mode 100644 index 0000000000000..3bbe347a63e50 --- /dev/null +++ b/tests/baselines/reference/declarationEmitRetainedAnnotationRetainsImportInOutput.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.ts] //// + +//// [index.d.ts] +export type Whatever = {x: T}; +export declare function something(cb: () => Whatever): Whatever; + +//// [index.ts] +import * as E from 'whatever'; + +export const run = (i: () => E.Whatever): E.Whatever => E.something(i); + +//// [index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.run = void 0; +var E = require("whatever"); +var run = function (i) { return E.something(i); }; +exports.run = run; + + +//// [index.d.ts] +import * as E from 'whatever'; +export declare const run: (i: () => E.Whatever) => E.Whatever; diff --git a/tests/baselines/reference/declarationEmitRetainedAnnotationRetainsImportInOutput.symbols b/tests/baselines/reference/declarationEmitRetainedAnnotationRetainsImportInOutput.symbols new file mode 100644 index 0000000000000..4efb920d98b99 --- /dev/null +++ b/tests/baselines/reference/declarationEmitRetainedAnnotationRetainsImportInOutput.symbols @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.ts] //// + +=== node_modules/whatever/index.d.ts === +export type Whatever = {x: T}; +>Whatever : Symbol(Whatever, Decl(index.d.ts, 0, 0)) +>T : Symbol(T, Decl(index.d.ts, 0, 21)) +>x : Symbol(x, Decl(index.d.ts, 0, 27)) +>T : Symbol(T, Decl(index.d.ts, 0, 21)) + +export declare function something(cb: () => Whatever): Whatever; +>something : Symbol(something, Decl(index.d.ts, 0, 33)) +>T : Symbol(T, Decl(index.d.ts, 1, 34)) +>cb : Symbol(cb, Decl(index.d.ts, 1, 37)) +>Whatever : Symbol(Whatever, Decl(index.d.ts, 0, 0)) +>T : Symbol(T, Decl(index.d.ts, 1, 34)) +>Whatever : Symbol(Whatever, Decl(index.d.ts, 0, 0)) +>T : Symbol(T, Decl(index.d.ts, 1, 34)) + +=== index.ts === +import * as E from 'whatever'; +>E : Symbol(E, Decl(index.ts, 0, 6)) + +export const run = (i: () => E.Whatever): E.Whatever => E.something(i); +>run : Symbol(run, Decl(index.ts, 2, 12)) +>E : Symbol(E, Decl(index.ts, 2, 20)) +>i : Symbol(i, Decl(index.ts, 2, 23)) +>E : Symbol(E, Decl(index.ts, 0, 6)) +>Whatever : Symbol(E.Whatever, Decl(index.d.ts, 0, 0)) +>E : Symbol(E, Decl(index.ts, 2, 20)) +>E : Symbol(E, Decl(index.ts, 0, 6)) +>Whatever : Symbol(E.Whatever, Decl(index.d.ts, 0, 0)) +>E : Symbol(E, Decl(index.ts, 2, 20)) +>E.something : Symbol(E.something, Decl(index.d.ts, 0, 33)) +>E : Symbol(E, Decl(index.ts, 0, 6)) +>something : Symbol(E.something, Decl(index.d.ts, 0, 33)) +>i : Symbol(i, Decl(index.ts, 2, 23)) + diff --git a/tests/baselines/reference/declarationEmitRetainedAnnotationRetainsImportInOutput.types b/tests/baselines/reference/declarationEmitRetainedAnnotationRetainsImportInOutput.types new file mode 100644 index 0000000000000..1051d467d4a2d --- /dev/null +++ b/tests/baselines/reference/declarationEmitRetainedAnnotationRetainsImportInOutput.types @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.ts] //// + +=== node_modules/whatever/index.d.ts === +export type Whatever = {x: T}; +>Whatever : Whatever +>x : T + +export declare function something(cb: () => Whatever): Whatever; +>something : (cb: () => Whatever) => Whatever +>cb : () => Whatever + +=== index.ts === +import * as E from 'whatever'; +>E : typeof E + +export const run = (i: () => E.Whatever): E.Whatever => E.something(i); +>run : (i: () => E.Whatever) => E.Whatever +>(i: () => E.Whatever): E.Whatever => E.something(i) : (i: () => E.Whatever) => E.Whatever +>i : () => E.Whatever +>E : any +>E : any +>E.something(i) : E.Whatever +>E.something : (cb: () => E.Whatever) => E.Whatever +>E : typeof E +>something : (cb: () => E.Whatever) => E.Whatever +>i : () => E.Whatever + diff --git a/tests/baselines/reference/defaultValueInFunctionTypes.types b/tests/baselines/reference/defaultValueInFunctionTypes.types index 38e4e17edacad..50060f43ed68f 100644 --- a/tests/baselines/reference/defaultValueInFunctionTypes.types +++ b/tests/baselines/reference/defaultValueInFunctionTypes.types @@ -2,7 +2,7 @@ === defaultValueInFunctionTypes.ts === type Foo = ({ first = 0 }: { first?: number }) => unknown; ->Foo : ({ first }: { first?: number; }) => unknown +>Foo : ({ first }: { first?: number;}) => unknown >first : number >0 : 0 >first : number diff --git a/tests/baselines/reference/dependentDestructuredVariables.types b/tests/baselines/reference/dependentDestructuredVariables.types index 0480bb1631c62..0196e27ada4bb 100644 --- a/tests/baselines/reference/dependentDestructuredVariables.types +++ b/tests/baselines/reference/dependentDestructuredVariables.types @@ -743,10 +743,10 @@ reducer("concat", { firstArr: [1, 2], secondArr: [3, 4] }); // repro from https://github.com/microsoft/TypeScript/pull/47190#issuecomment-1057603588 type FooMethod = { ->FooMethod : { method(...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]): void; } +>FooMethod : { method(...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]): void; } method(...args: ->method : (...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]) => void +>method : (...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]) => void >args : [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void] [type: "str", cb: (e: string) => void] | @@ -787,10 +787,10 @@ let fooM: FooMethod = { }; type FooAsyncMethod = { ->FooAsyncMethod : { method(...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]): Promise; } +>FooAsyncMethod : { method(...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]): Promise; } method(...args: ->method : (...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]) => Promise +>method : (...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]) => Promise >args : [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void] [type: "str", cb: (e: string) => void] | @@ -831,10 +831,10 @@ let fooAsyncM: FooAsyncMethod = { }; type FooGenMethod = { ->FooGenMethod : { method(...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]): Generator; } +>FooGenMethod : { method(...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]): Generator; } method(...args: ->method : (...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]) => Generator +>method : (...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]) => Generator >args : [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void] [type: "str", cb: (e: string) => void] | @@ -875,10 +875,10 @@ let fooGenM: FooGenMethod = { }; type FooAsyncGenMethod = { ->FooAsyncGenMethod : { method(...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]): AsyncGenerator; } +>FooAsyncGenMethod : { method(...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]): AsyncGenerator; } method(...args: ->method : (...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]) => AsyncGenerator +>method : (...args: [ type: "str", cb: (e: string) => void] | [ type: "num", cb: (e: number) => void]) => AsyncGenerator >args : [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void] [type: "str", cb: (e: string) => void] | diff --git a/tests/baselines/reference/destructuringAssignmentWithDefault.types b/tests/baselines/reference/destructuringAssignmentWithDefault.types index 2475aa92c4267..e53d6c735e332 100644 --- a/tests/baselines/reference/destructuringAssignmentWithDefault.types +++ b/tests/baselines/reference/destructuringAssignmentWithDefault.types @@ -21,7 +21,7 @@ let x = 0; // Repro from #26235 function f1(options?: { color?: string, width?: number }) { ->f1 : (options?: { color?: string | undefined; width?: number | undefined; } | undefined) => void +>f1 : (options?: { color?: string; width?: number;}) => void >options : { color?: string | undefined; width?: number | undefined; } | undefined >color : string | undefined >width : number | undefined @@ -93,7 +93,7 @@ function f2(options?: [string?, number?]) { } function f3(options?: { color: string, width: number }) { ->f3 : (options?: { color: string; width: number; } | undefined) => void +>f3 : (options?: { color: string; width: number;}) => void >options : { color: string; width: number; } | undefined >color : string >width : number diff --git a/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=false).types b/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=false).types index 8557468ab571e..f16f9997e9df7 100644 --- a/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=false).types +++ b/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=false).types @@ -27,7 +27,7 @@ interface ExecutionContext { } type CoercedVariableValues = ->CoercedVariableValues : { errors: ReadonlyArray; coerced?: undefined; } | { coerced: { [variable: string]: unknown; }; errors?: undefined; } +>CoercedVariableValues : { errors: ReadonlyArray; coerced?: undefined; } | { coerced: { [variable: string]: unknown;}; errors?: undefined; } | { errors: ReadonlyArray; coerced?: never } >errors : readonly GraphQLError[] @@ -39,7 +39,7 @@ type CoercedVariableValues = >errors : undefined declare function getVariableValues(inputs: { ->getVariableValues : (inputs: { readonly [variable: string]: unknown; }) => CoercedVariableValues +>getVariableValues : (inputs: { readonly [variable: string]: unknown;}) => CoercedVariableValues >inputs : { readonly [variable: string]: unknown; } readonly [variable: string]: unknown; diff --git a/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=true).types b/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=true).types index cb2203fa0ad1d..d81d2d67fc27c 100644 --- a/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=true).types +++ b/tests/baselines/reference/discriminateWithOptionalProperty3(exactoptionalpropertytypes=true).types @@ -27,7 +27,7 @@ interface ExecutionContext { } type CoercedVariableValues = ->CoercedVariableValues : { errors: ReadonlyArray; coerced?: never; } | { coerced: { [variable: string]: unknown; }; errors?: never; } +>CoercedVariableValues : { errors: ReadonlyArray; coerced?: never; } | { coerced: { [variable: string]: unknown;}; errors?: never; } | { errors: ReadonlyArray; coerced?: never } >errors : readonly GraphQLError[] @@ -39,7 +39,7 @@ type CoercedVariableValues = >errors : undefined declare function getVariableValues(inputs: { ->getVariableValues : (inputs: { readonly [variable: string]: unknown; }) => CoercedVariableValues +>getVariableValues : (inputs: { readonly [variable: string]: unknown;}) => CoercedVariableValues >inputs : { readonly [variable: string]: unknown; } readonly [variable: string]: unknown; diff --git a/tests/baselines/reference/duplicateObjectLiteralProperty_computedNameNegative1.types b/tests/baselines/reference/duplicateObjectLiteralProperty_computedNameNegative1.types index dcb52f928ee05..4a8627ca3562b 100644 --- a/tests/baselines/reference/duplicateObjectLiteralProperty_computedNameNegative1.types +++ b/tests/baselines/reference/duplicateObjectLiteralProperty_computedNameNegative1.types @@ -4,7 +4,7 @@ // repro from https://github.com/microsoft/TypeScript/issues/56341 function bar(props: { x?: string; y?: string }) { ->bar : (props: { x?: string | undefined; y?: string | undefined; }) => { [x: string]: number; } +>bar : (props: { x?: string; y?: string;}) => { [x: string]: number; } >props : { x?: string | undefined; y?: string | undefined; } >x : string | undefined >y : string | undefined diff --git a/tests/baselines/reference/emitRestParametersFunctionProperty.types b/tests/baselines/reference/emitRestParametersFunctionProperty.types index b0a048771c982..e8ea41cd019ec 100644 --- a/tests/baselines/reference/emitRestParametersFunctionProperty.types +++ b/tests/baselines/reference/emitRestParametersFunctionProperty.types @@ -2,7 +2,7 @@ === emitRestParametersFunctionProperty.ts === var obj: { ->obj : { func1: (...rest: any[]) => void; } +>obj : { func1: (...rest) => void; } func1: (...rest) => void >func1 : (...rest: any[]) => void diff --git a/tests/baselines/reference/emitRestParametersFunctionPropertyES6.types b/tests/baselines/reference/emitRestParametersFunctionPropertyES6.types index 16d508a5043ba..8ff0271410a08 100644 --- a/tests/baselines/reference/emitRestParametersFunctionPropertyES6.types +++ b/tests/baselines/reference/emitRestParametersFunctionPropertyES6.types @@ -2,7 +2,7 @@ === emitRestParametersFunctionPropertyES6.ts === var obj: { ->obj : { func1: (...rest: any[]) => void; } +>obj : { func1: (...rest) => void; } func1: (...rest) => void >func1 : (...rest: any[]) => void diff --git a/tests/baselines/reference/enumAssignabilityInInheritance.types b/tests/baselines/reference/enumAssignabilityInInheritance.types index f1bbea0277f17..e70ae995d6d9d 100644 --- a/tests/baselines/reference/enumAssignabilityInInheritance.types +++ b/tests/baselines/reference/enumAssignabilityInInheritance.types @@ -207,7 +207,7 @@ var r4 = foo10(E.A); >A : E declare function foo11(x: (x) => number): (x) => number; ->foo11 : { (x: (x: any) => number): (x: any) => number; (x: E): E; } +>foo11 : { (x: (x) => number): (x) => number; (x: E): E; } >x : (x: any) => number >x : any >x : any diff --git a/tests/baselines/reference/esDecorators-contextualTypes.2.types b/tests/baselines/reference/esDecorators-contextualTypes.2.types index e0e2caf638f53..fc2b84e73b140 100644 --- a/tests/baselines/reference/esDecorators-contextualTypes.2.types +++ b/tests/baselines/reference/esDecorators-contextualTypes.2.types @@ -35,14 +35,14 @@ export { C }; >C : typeof C function boundMethodLogger(source: string, bound = true) { ->boundMethodLogger : (source: string, bound?: boolean) => (target: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext Return>) => (this: This, ...args: Args) => Return +>boundMethodLogger : (source: string, bound?: boolean) => (target: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext Return>) => ((this: This, ...args: Args) => Return) >source : string >bound : boolean >true : true return function loggedDecorator( ->function loggedDecorator( target: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext Return> ): ((this: This, ...args: Args) => Return) { if (bound) { context.addInitializer(function () { (this as any)[context.name] = (this as any)[context.name].bind(this); }); } return function (this, ...args) { console.log(`<${source}>: I'm logging stuff from ${context.name.toString()}!`); return target.apply(this, args); } } : (target: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext Return>) => (this: This, ...args: Args) => Return ->loggedDecorator : (target: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext Return>) => (this: This, ...args: Args) => Return +>function loggedDecorator( target: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext Return> ): ((this: This, ...args: Args) => Return) { if (bound) { context.addInitializer(function () { (this as any)[context.name] = (this as any)[context.name].bind(this); }); } return function (this, ...args) { console.log(`<${source}>: I'm logging stuff from ${context.name.toString()}!`); return target.apply(this, args); } } : (target: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext Return>) => ((this: This, ...args: Args) => Return) +>loggedDecorator : (target: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext Return>) => ((this: This, ...args: Args) => Return) target: (this: This, ...args: Args) => Return, >target : (this: This, ...args: Args) => Return diff --git a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types index e1c63b94db34a..f01353028c5c0 100644 --- a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types +++ b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types @@ -3,8 +3,8 @@ === esNextWeakRefs_IterableWeakMap.ts === /** `static #cleanup` */ const IterableWeakMap_cleanup = ({ ref, set }: { ->IterableWeakMap_cleanup : ({ ref, set }: { readonly ref: WeakRef; readonly set: Set>; }) => void ->({ ref, set }: { readonly ref: WeakRef; readonly set: Set>;}) => { set.delete(ref);} : ({ ref, set }: { readonly ref: WeakRef; readonly set: Set>; }) => void +>IterableWeakMap_cleanup : ({ ref, set }: { readonly ref: WeakRef; readonly set: Set>;}) => void +>({ ref, set }: { readonly ref: WeakRef; readonly set: Set>;}) => { set.delete(ref);} : ({ ref, set }: { readonly ref: WeakRef; readonly set: Set>;}) => void >ref : WeakRef >set : Set> diff --git a/tests/baselines/reference/excessPropertyCheckingIntersectionWithConditional.types b/tests/baselines/reference/excessPropertyCheckingIntersectionWithConditional.types index 5e2a24c01df20..22810225c66d3 100644 --- a/tests/baselines/reference/excessPropertyCheckingIntersectionWithConditional.types +++ b/tests/baselines/reference/excessPropertyCheckingIntersectionWithConditional.types @@ -6,8 +6,8 @@ type Foo = K extends unknown ? { a: number } : unknown >a : number const createDefaultExample = (x: K): Foo & { x: K; } => { ->createDefaultExample : (x: K) => Foo & { x: K; } ->(x: K): Foo & { x: K; } => { return { a: 1, x: x }; // okay in TS 4.7.4, error in TS 4.8.2} : (x: K) => Foo & { x: K; } +>createDefaultExample : (x: K) => Foo & { x: K;} +>(x: K): Foo & { x: K; } => { return { a: 1, x: x }; // okay in TS 4.7.4, error in TS 4.8.2} : (x: K) => Foo & { x: K;} >x : K >x : K diff --git a/tests/baselines/reference/forInStrictNullChecksNoError.types b/tests/baselines/reference/forInStrictNullChecksNoError.types index 24d5586144add..3baf3da546d91 100644 --- a/tests/baselines/reference/forInStrictNullChecksNoError.types +++ b/tests/baselines/reference/forInStrictNullChecksNoError.types @@ -2,7 +2,7 @@ === forInStrictNullChecksNoError.ts === function f(x: { [key: string]: number; } | null | undefined) { ->f : (x: { [key: string]: number; } | null | undefined) => void +>f : (x: { [key: string]: number;} | null | undefined) => void >x : { [key: string]: number; } | null | undefined >key : string diff --git a/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.types b/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.types index 0fcad4f3b53d4..7dd9c2d2cb0c9 100644 --- a/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.types +++ b/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.types @@ -2,7 +2,7 @@ === functionDeclarationWithArgumentOfTypeFunctionTypeArray.ts === function foo(args: { (x): number }[]) { ->foo : (args: ((x: any) => number)[]) => number +>foo : (args: { (x): number;}[]) => number >args : ((x: any) => number)[] >x : any diff --git a/tests/baselines/reference/functionLiterals.types b/tests/baselines/reference/functionLiterals.types index 17f64c39de6c8..29a49ab24fc6e 100644 --- a/tests/baselines/reference/functionLiterals.types +++ b/tests/baselines/reference/functionLiterals.types @@ -4,7 +4,7 @@ // PropName(ParamList):ReturnType is equivalent to PropName: { (ParamList): ReturnType } var b: { ->b : { func1(x: number): number; func2: (x: number) => number; func3: (x: number) => number; } +>b : { func1(x: number): number; func2: (x: number) => number; func3: { (x: number): number;}; } func1(x: number): number; // Method signature >func1 : (x: number) => number @@ -75,7 +75,7 @@ b.func3 = b.func2; >func2 : (x: number) => number var c: { ->c : { func4(x: number): number; func4(s: string): string; func5: { (x: number): number; (s: string): string; }; } +>c : { func4(x: number): number; func4(s: string): string; func5: { (x: number): number; (s: string): string;}; } func4(x: number): number; >func4 : { (x: number): number; (s: string): string; } diff --git a/tests/baselines/reference/generatedContextualTyping.types b/tests/baselines/reference/generatedContextualTyping.types index 9be31bf829d59..0d545d2def796 100644 --- a/tests/baselines/reference/generatedContextualTyping.types +++ b/tests/baselines/reference/generatedContextualTyping.types @@ -1093,7 +1093,7 @@ function x128(parm: Array = [d1, d2]) { } >d2 : Derived2 function x129(parm: { [n: number]: Base; } = [d1, d2]) { } ->x129 : (parm?: { [n: number]: Base; }) => void +>x129 : (parm?: { [n: number]: Base;}) => void >parm : { [n: number]: Base; } >n : number >[d1, d2] : (Derived1 | Derived2)[] @@ -1186,7 +1186,7 @@ function x140(): Array { return [d1, d2]; } >d2 : Derived2 function x141(): { [n: number]: Base; } { return [d1, d2]; } ->x141 : () => { [n: number]: Base; } +>x141 : () => { [n: number]: Base;} >n : number >[d1, d2] : (Derived1 | Derived2)[] >d1 : Derived1 @@ -1307,7 +1307,7 @@ function x152(): Array { return [d1, d2]; return [d1, d2]; } >d2 : Derived2 function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } ->x153 : () => { [n: number]: Base; } +>x153 : () => { [n: number]: Base;} >n : number >[d1, d2] : (Derived1 | Derived2)[] >d1 : Derived1 @@ -1422,7 +1422,7 @@ var x164: () => Array = () => { return [d1, d2]; }; >d2 : Derived2 var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; ->x165 : () => { [n: number]: Base; } +>x165 : () => { [n: number]: Base;} >n : number >() => { return [d1, d2]; } : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] @@ -1523,7 +1523,7 @@ var x176: () => Array = function() { return [d1, d2]; }; >d2 : Derived2 var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; ->x177 : () => { [n: number]: Base; } +>x177 : () => { [n: number]: Base;} >n : number >function() { return [d1, d2]; } : () => (Derived1 | Derived2)[] >[d1, d2] : (Derived1 | Derived2)[] @@ -2122,7 +2122,7 @@ var x244: { n: Array; } = { n: [d1, d2] }; >d2 : Derived2 var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; ->x245 : { n: { [n: number]: Base; }; } +>x245 : { n: { [n: number]: Base;}; } >n : { [n: number]: Base; } >n : number >{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } @@ -2974,7 +2974,7 @@ function x328(n: Array) { }; x328([d1, d2]); >d2 : Derived2 function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); ->x329 : (n: { [n: number]: Base; }) => void +>x329 : (n: { [n: number]: Base;}) => void >n : { [n: number]: Base; } >n : number >x329([d1, d2]) : void @@ -3115,8 +3115,8 @@ var x340 = (n: Array) => n; x340([d1, d2]); >d2 : Derived2 var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); ->x341 : (n: { [n: number]: Base; }) => { [n: number]: Base; } ->(n: { [n: number]: Base; }) => n : (n: { [n: number]: Base; }) => { [n: number]: Base; } +>x341 : (n: { [n: number]: Base;}) => { [n: number]: Base; } +>(n: { [n: number]: Base; }) => n : (n: { [n: number]: Base;}) => { [n: number]: Base; } >n : { [n: number]: Base; } >n : number >n : { [n: number]: Base; } @@ -3127,8 +3127,8 @@ var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); >d2 : Derived2 var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); ->x342 : (n: { n: Base[]; }) => { n: Base[]; } ->(n: {n: Base[]; } ) => n : (n: { n: Base[]; }) => { n: Base[]; } +>x342 : (n: { n: Base[];}) => { n: Base[]; } +>(n: {n: Base[]; } ) => n : (n: { n: Base[];}) => { n: Base[]; } >n : { n: Base[]; } >n : Base[] >n : { n: Base[]; } @@ -3256,8 +3256,8 @@ var x352 = function(n: Array) { }; x352([d1, d2]); >d2 : Derived2 var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); ->x353 : (n: { [n: number]: Base; }) => void ->function(n: { [n: number]: Base; }) { } : (n: { [n: number]: Base; }) => void +>x353 : (n: { [n: number]: Base;}) => void +>function(n: { [n: number]: Base; }) { } : (n: { [n: number]: Base;}) => void >n : { [n: number]: Base; } >n : number >x353([d1, d2]) : void @@ -3267,8 +3267,8 @@ var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); >d2 : Derived2 var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); ->x354 : (n: { n: Base[]; }) => void ->function(n: {n: Base[]; } ) { } : (n: { n: Base[]; }) => void +>x354 : (n: { n: Base[];}) => void +>function(n: {n: Base[]; } ) { } : (n: { n: Base[];}) => void >n : { n: Base[]; } >n : Base[] >x354({ n: [d1, d2] }) : void diff --git a/tests/baselines/reference/generatorTypeCheck29.types b/tests/baselines/reference/generatorTypeCheck29.types index c6c64c184a90b..3679c7afad03d 100644 --- a/tests/baselines/reference/generatorTypeCheck29.types +++ b/tests/baselines/reference/generatorTypeCheck29.types @@ -2,7 +2,7 @@ === generatorTypeCheck29.ts === function* g2(): Iterator number>> { ->g2 : () => Iterator number>, any, undefined> +>g2 : () => Iterator number>> >x : string yield function* () { diff --git a/tests/baselines/reference/generatorTypeCheck30.types b/tests/baselines/reference/generatorTypeCheck30.types index a4259dfaefafa..e522c7cbb8a6c 100644 --- a/tests/baselines/reference/generatorTypeCheck30.types +++ b/tests/baselines/reference/generatorTypeCheck30.types @@ -2,7 +2,7 @@ === generatorTypeCheck30.ts === function* g2(): Iterator number>> { ->g2 : () => Iterator number>, any, undefined> +>g2 : () => Iterator number>> >x : string yield function* () { diff --git a/tests/baselines/reference/generatorTypeCheck31.types b/tests/baselines/reference/generatorTypeCheck31.types index f25afe8ec55dd..50b48fa47bee5 100644 --- a/tests/baselines/reference/generatorTypeCheck31.types +++ b/tests/baselines/reference/generatorTypeCheck31.types @@ -2,7 +2,7 @@ === generatorTypeCheck31.ts === function* g2(): Iterator<() => Iterable<(x: string) => number>> { ->g2 : () => Iterator<() => Iterable<(x: string) => number>, any, undefined> +>g2 : () => Iterator<() => Iterable<(x: string) => number>> >x : string yield function* () { diff --git a/tests/baselines/reference/generatorTypeCheck45.types b/tests/baselines/reference/generatorTypeCheck45.types index e85d46a50e152..646d73827b320 100644 --- a/tests/baselines/reference/generatorTypeCheck45.types +++ b/tests/baselines/reference/generatorTypeCheck45.types @@ -2,9 +2,9 @@ === generatorTypeCheck45.ts === declare function foo(x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) => T): T; ->foo : (x: T, fun: () => Iterator<(x: T) => U, any, undefined>, fun2: (y: U) => T) => T +>foo : (x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) => T) => T >x : T ->fun : () => Iterator<(x: T) => U, any, undefined> +>fun : () => Iterator<(x: T) => U> >x : T >fun2 : (y: U) => T >y : U diff --git a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.types b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.types index 47bff51439e16..e6d18ddadbe67 100644 --- a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.types +++ b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.types @@ -4,7 +4,7 @@ // Generic call with parameter of object type with member of function type of n args passed object whose associated member is call signature with n+1 args function foo(arg: { cb: new(t: T) => U }) { ->foo : (arg: { cb: new (t: T) => U; }) => U +>foo : (arg: { cb: new (t: T) => U;}) => U >arg : { cb: new (t: T) => U; } >cb : new (t: T) => U >t : T @@ -53,7 +53,7 @@ var r3 = foo(arg3); // error >arg3 : { cb: new (x: string, y: number) => string; } function foo2(arg: { cb: new(t: T, t2: T) => U }) { ->foo2 : (arg: { cb: new (t: T, t2: T) => U; }) => U +>foo2 : (arg: { cb: new (t: T, t2: T) => U;}) => U >arg : { cb: new (t: T, t2: T) => U; } >cb : new (t: T, t2: T) => U >t : T diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.types b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.types index aa75032d49894..a2a0146cc95f7 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.types +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.types @@ -4,7 +4,7 @@ // Generic call with parameter of object type with member of function type of n args passed object whose associated member is call signature with n+1 args function foo(arg: { cb: (t: T) => U }) { ->foo : (arg: { cb: (t: T) => U; }) => U +>foo : (arg: { cb: (t: T) => U;}) => U >arg : { cb: (t: T) => U; } >cb : (t: T) => U >t : T @@ -54,7 +54,7 @@ var r3 = foo({ cb: (x: string, y: number) => '' }); // error >'' : "" function foo2(arg: { cb: (t: T, t2: T) => U }) { ->foo2 : (arg: { cb: (t: T, t2: T) => U; }) => U +>foo2 : (arg: { cb: (t: T, t2: T) => U;}) => U >arg : { cb: (t: T, t2: T) => U; } >cb : (t: T, t2: T) => U >t : T diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types index 94df87dabc2eb..d45d0d8172ed4 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types @@ -48,7 +48,7 @@ module GenericParameter { >GenericParameter : typeof GenericParameter function foo5(cb: { new(x: T): string; new(x: number): T }) { ->foo5 : (cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; } +>foo5 : (cb: { new (x: T): string; new (x: number): T;}) => { new (x: T): string; new (x: number): T; } >cb : { new (x: T): string; new (x: number): T; } >x : T >x : number @@ -84,7 +84,7 @@ module GenericParameter { >b : { new (x: T): string; new (x: number): T_1; } function foo6(cb: { new(x: T): string; new(x: T, y?: T): string }) { ->foo6 : (cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } +>foo6 : (cb: { new (x: T): string; new (x: T, y?: T): string;}) => { new (x: T): string; new (x: T, y?: T): string; } >cb : { new (x: T): string; new (x: T, y?: T): string; } >x : T >x : T @@ -107,7 +107,7 @@ module GenericParameter { >b : { new (x: T): string; new (x: number): T_1; } function foo7(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) { ->foo7 : (x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } +>foo7 : (x: T, cb: { new (x: T): string; new (x: T, y?: T): string;}) => { new (x: T): string; new (x: T, y?: T): string; } >x : T >cb : { new (x: T): string; new (x: T, y?: T): string; } >x : T diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types index 791ce86fc9574..b59731ed5482b 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types @@ -41,7 +41,7 @@ module GenericParameter { >GenericParameter : typeof GenericParameter function foo5(cb: { new(x: T): string; new(x: number): T }) { ->foo5 : (cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; } +>foo5 : (cb: { new (x: T): string; new (x: number): T;}) => { new (x: T): string; new (x: number): T; } >cb : { new (x: T): string; new (x: number): T; } >x : T >x : number @@ -61,7 +61,7 @@ module GenericParameter { >a : new (x: T) => T function foo6(cb: { new(x: T): string; new(x: T, y?: T): string }) { ->foo6 : (cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } +>foo6 : (cb: { new (x: T): string; new (x: T, y?: T): string;}) => { new (x: T): string; new (x: T, y?: T): string; } >cb : { new (x: T): string; new (x: T, y?: T): string; } >x : T >x : T @@ -83,7 +83,7 @@ module GenericParameter { >b : new (x: T, y: T) => string function foo7(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) { ->foo7 : (x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } +>foo7 : (x: T, cb: { new (x: T): string; new (x: T, y?: T): string;}) => { new (x: T): string; new (x: T, y?: T): string; } >x : T >cb : { new (x: T): string; new (x: T, y?: T): string; } >x : T diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types index bb7832a8e3a99..8c9fe30bd83e3 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types @@ -53,7 +53,7 @@ module GenericParameter { >GenericParameter : typeof GenericParameter function foo5(cb: { (x: T): string; (x: number): T }) { ->foo5 : (cb: { (x: T): string; (x: number): T; }) => { (x: T): string; (x: number): T; } +>foo5 : (cb: { (x: T): string; (x: number): T;}) => { (x: T): string; (x: number): T; } >cb : { (x: T): string; (x: number): T; } >x : T >x : number @@ -82,7 +82,7 @@ module GenericParameter { >a : { (x: T): string; (x: number): T_1; } function foo6(cb: { (x: T): string; (x: T, y?: T): string }) { ->foo6 : (cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } +>foo6 : (cb: { (x: T): string; (x: T, y?: T): string;}) => { (x: T): string; (x: T, y?: T): string; } >cb : { (x: T): string; (x: T, y?: T): string; } >x : T >x : T @@ -118,7 +118,7 @@ module GenericParameter { >'' : "" function foo7(x:T, cb: { (x: T): string; (x: T, y?: T): string }) { ->foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } +>foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string;}) => { (x: T): string; (x: T, y?: T): string; } >x : T >cb : { (x: T): string; (x: T, y?: T): string; } >x : T diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types index af5874bcd73b5..7d894ea158fd6 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.types @@ -40,7 +40,7 @@ module GenericParameter { >GenericParameter : typeof GenericParameter function foo5(cb: { (x: T): string; (x: number): T }) { ->foo5 : (cb: { (x: T): string; (x: number): T; }) => { (x: T): string; (x: number): T; } +>foo5 : (cb: { (x: T): string; (x: number): T;}) => { (x: T): string; (x: number): T; } >cb : { (x: T): string; (x: number): T; } >x : T >x : number @@ -58,7 +58,7 @@ module GenericParameter { >x : T function foo6(cb: { (x: T): string; (x: T, y?: T): string }) { ->foo6 : (cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } +>foo6 : (cb: { (x: T): string; (x: T, y?: T): string;}) => { (x: T): string; (x: T, y?: T): string; } >cb : { (x: T): string; (x: T, y?: T): string; } >x : T >x : T @@ -78,7 +78,7 @@ module GenericParameter { >'' : "" function foo7(x:T, cb: { (x: T): string; (x: T, y?: T): string }) { ->foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } +>foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string;}) => { (x: T): string; (x: T, y?: T): string; } >x : T >cb : { (x: T): string; (x: T, y?: T): string; } >x : T diff --git a/tests/baselines/reference/genericFunctionInference1.types b/tests/baselines/reference/genericFunctionInference1.types index f51ff23ee1cfb..d0b62deb64fea 100644 --- a/tests/baselines/reference/genericFunctionInference1.types +++ b/tests/baselines/reference/genericFunctionInference1.types @@ -411,7 +411,7 @@ const f41 = pipe4([box, list]); >list : (a: T) => T[] declare function pipe5(f: (a: A) => B): { f: (a: A) => B }; ->pipe5 : (f: (a: A) => B) => { f: (a: A) => B; } +>pipe5 : (f: (a: A) => B) => { f: (a: A) => B;} >f : (a: A) => B >a : A >f : (a: A) => B diff --git a/tests/baselines/reference/genericInterfaceTypeCall.types b/tests/baselines/reference/genericInterfaceTypeCall.types index aea27faa0a15d..0d7c655bb6fb7 100644 --- a/tests/baselines/reference/genericInterfaceTypeCall.types +++ b/tests/baselines/reference/genericInterfaceTypeCall.types @@ -16,7 +16,7 @@ interface bar { >arg : T fail2(func2: { (arg: T): void; }): void; ->fail2 : (func2: (arg: T) => void) => void +>fail2 : (func2: { (arg: T): void;}) => void >func2 : (arg: T) => void >arg : T } diff --git a/tests/baselines/reference/getParameterNameAtPosition.types b/tests/baselines/reference/getParameterNameAtPosition.types index f86cc68820d1f..917f60f2bb723 100644 --- a/tests/baselines/reference/getParameterNameAtPosition.types +++ b/tests/baselines/reference/getParameterNameAtPosition.types @@ -18,7 +18,7 @@ declare function cases(tester: Tester): void; >tester : Tester declare function fn(implementation?: (...args: Y) => any): Mock; ->fn : (implementation?: ((...args: Y) => any) | undefined) => Mock +>fn : (implementation?: (...args: Y) => any) => Mock >implementation : ((...args: Y) => any) | undefined >args : Y diff --git a/tests/baselines/reference/identityAndDivergentNormalizedTypes.types b/tests/baselines/reference/identityAndDivergentNormalizedTypes.types index 5c86e8d8f594a..ae62486c370fe 100644 --- a/tests/baselines/reference/identityAndDivergentNormalizedTypes.types +++ b/tests/baselines/reference/identityAndDivergentNormalizedTypes.types @@ -30,8 +30,8 @@ type PostBody = Extract["body"]; >path : PATH const post = ( ->post : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void ->( path: PATH, {body, ...options}: Omit & {body: PostBody}) => {} : (path: PATH, { body, ...options }: Omit & { body: PostBody; }) => void +>post : (path: PATH, { body, ...options }: Omit & { body: PostBody;}) => void +>( path: PATH, {body, ...options}: Omit & {body: PostBody}) => {} : (path: PATH, { body, ...options }: Omit & { body: PostBody;}) => void path: PATH, >path : PATH diff --git a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.types b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.types index 4492651611974..e8c18512c9f82 100644 --- a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.types +++ b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.types @@ -42,7 +42,7 @@ function testObjLiteral(objLit: { v: any; w: any }) { }; >w : any function testFuncLiteral(funcLit: (y2) => number) { }; ->testFuncLiteral : (funcLit: (y2: any) => number) => void +>testFuncLiteral : (funcLit: (y2) => number) => void >funcLit : (y2: any) => number >y2 : any diff --git a/tests/baselines/reference/implicitIndexSignatures.types b/tests/baselines/reference/implicitIndexSignatures.types index f0a157ae69c76..52e94ad84278b 100644 --- a/tests/baselines/reference/implicitIndexSignatures.types +++ b/tests/baselines/reference/implicitIndexSignatures.types @@ -58,12 +58,12 @@ map = names2; >names2 : { a: string; b: string; } declare function getStringIndexValue(map: { [x: string]: T }): T; ->getStringIndexValue : (map: { [x: string]: T; }) => T +>getStringIndexValue : (map: { [x: string]: T;}) => T >map : { [x: string]: T; } >x : string declare function getNumberIndexValue(map: { [x: number]: T }): T; ->getNumberIndexValue : (map: { [x: number]: T; }) => T +>getNumberIndexValue : (map: { [x: number]: T;}) => T >map : { [x: number]: T; } >x : number diff --git a/tests/baselines/reference/indexSignatureAndMappedType.types b/tests/baselines/reference/indexSignatureAndMappedType.types index 68995d70c54d5..6532f35075005 100644 --- a/tests/baselines/reference/indexSignatureAndMappedType.types +++ b/tests/baselines/reference/indexSignatureAndMappedType.types @@ -5,7 +5,7 @@ // { [key: string]: Y } if X is related to Y. function f1(x: { [key: string]: T }, y: Record) { ->f1 : (x: { [key: string]: T; }, y: Record) => void +>f1 : (x: { [key: string]: T;}, y: Record) => void >x : { [key: string]: T; } >key : string >y : Record @@ -22,7 +22,7 @@ function f1(x: { [key: string]: T }, y: Record) { } function f2(x: { [key: string]: T }, y: Record) { ->f2 : (x: { [key: string]: T; }, y: Record) => void +>f2 : (x: { [key: string]: T;}, y: Record) => void >x : { [key: string]: T; } >key : string >y : Record @@ -39,7 +39,7 @@ function f2(x: { [key: string]: T }, y: Record) { } function f3(x: { [key: string]: T }, y: Record) { ->f3 : (x: { [key: string]: T; }, y: Record) => void +>f3 : (x: { [key: string]: T;}, y: Record) => void >x : { [key: string]: T; } >key : string >y : Record diff --git a/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.types b/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.types index 4761d930a15b0..29879fc79cf3e 100644 --- a/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.types +++ b/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.types @@ -2,7 +2,7 @@ === indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts === declare function f(x: { [x: string]: T }): T; ->f : (x: { [x: string]: T; }) => T +>f : (x: { [x: string]: T;}) => T >x : { [x: string]: T; } >x : string diff --git a/tests/baselines/reference/indexSignatures1.types b/tests/baselines/reference/indexSignatures1.types index 144face6af93b..24b0af61566f2 100644 --- a/tests/baselines/reference/indexSignatures1.types +++ b/tests/baselines/reference/indexSignatures1.types @@ -9,7 +9,7 @@ const sym = Symbol(); >Symbol : SymbolConstructor function gg3(x: { [key: string]: string }, y: { [key: symbol]: string }, z: { [sym]: number }) { ->gg3 : (x: { [key: string]: string; }, y: { [key: symbol]: string; }, z: { [sym]: number;}) => void +>gg3 : (x: { [key: string]: string;}, y: { [key: symbol]: string;}, z: { [sym]: number;}) => void >x : { [key: string]: string; } >key : string >y : { [key: symbol]: string; } @@ -32,7 +32,7 @@ function gg3(x: { [key: string]: string }, y: { [key: symbol]: string }, z: { [s // Overlapping index signatures function gg1(x: { [key: `a${string}`]: string, [key: `${string}a`]: string }, y: { [key: `a${string}a`]: string }) { ->gg1 : (x: { [key: `a${string}`]: string; [key: `${string}a`]: string; }, y: { [key: `a${string}a`]: string; }) => void +>gg1 : (x: { [key: `a${string}`]: string; [key: `${string}a`]: string;}, y: { [key: `a${string}a`]: string;}) => void >x : { [key: `a${string}`]: string; [key: `${string}a`]: string; } >key : `a${string}` >key : `${string}a` diff --git a/tests/baselines/reference/indexSignaturesInferentialTyping.types b/tests/baselines/reference/indexSignaturesInferentialTyping.types index 9d5d0be42c466..f853b4490ddbf 100644 --- a/tests/baselines/reference/indexSignaturesInferentialTyping.types +++ b/tests/baselines/reference/indexSignaturesInferentialTyping.types @@ -2,13 +2,13 @@ === indexSignaturesInferentialTyping.ts === function foo(items: { [index: number]: T }): T { return undefined; } ->foo : (items: { [index: number]: T; }) => T +>foo : (items: { [index: number]: T;}) => T >items : { [index: number]: T; } >index : number >undefined : undefined function bar(items: { [index: string]: T }): T { return undefined; } ->bar : (items: { [index: string]: T; }) => T +>bar : (items: { [index: string]: T;}) => T >items : { [index: string]: T; } >index : string >undefined : undefined diff --git a/tests/baselines/reference/indexerReturningTypeParameter1.types b/tests/baselines/reference/indexerReturningTypeParameter1.types index d691d27c4dd43..ddc46141f0611 100644 --- a/tests/baselines/reference/indexerReturningTypeParameter1.types +++ b/tests/baselines/reference/indexerReturningTypeParameter1.types @@ -3,7 +3,7 @@ === indexerReturningTypeParameter1.ts === interface f { groupBy(): { [key: string]: T[]; }; ->groupBy : () => { [key: string]: T[]; } +>groupBy : () => { [key: string]: T[];} >key : string } var a: f; @@ -20,7 +20,7 @@ class c { >c : c groupBy(): { [key: string]: T[]; } { ->groupBy : () => { [key: string]: T[]; } +>groupBy : () => { [key: string]: T[];} >key : string return null; diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types index 7d001af103620..5d84cf56eae6f 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types @@ -522,7 +522,7 @@ class ClassWithConvert { >val : T convert(converter: { to: (v: T) => T; }) { } ->convert : (converter: { to: (v: T) => T; }) => void +>convert : (converter: { to: (v: T) => T;}) => void >converter : { to: (v: T) => T; } >to : (v: T) => T >v : T diff --git a/tests/baselines/reference/inferPropertyWithContextSensitiveReturnStatement.types b/tests/baselines/reference/inferPropertyWithContextSensitiveReturnStatement.types index fdf38766558b9..2a4fe954e188e 100644 --- a/tests/baselines/reference/inferPropertyWithContextSensitiveReturnStatement.types +++ b/tests/baselines/reference/inferPropertyWithContextSensitiveReturnStatement.types @@ -4,7 +4,7 @@ // repro #50687 declare function repro(config: { ->repro : (config: { params: T; callback: () => (params: T) => number; }) => void +>repro : (config: { params: T; callback: () => (params: T) => number;}) => void >config : { params: T; callback: () => (params: T) => number; } params: T; diff --git a/tests/baselines/reference/inferenceDoesNotAddUndefinedOrNull.types b/tests/baselines/reference/inferenceDoesNotAddUndefinedOrNull.types index fb0cadb30bedc..123c4ed08a176 100644 --- a/tests/baselines/reference/inferenceDoesNotAddUndefinedOrNull.types +++ b/tests/baselines/reference/inferenceDoesNotAddUndefinedOrNull.types @@ -5,7 +5,7 @@ interface NodeArray extends ReadonlyArray {} interface Node { forEachChild(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray) => T | undefined): T | undefined; ->forEachChild : (cbNode: (node: Node) => T | undefined, cbNodeArray?: ((nodes: NodeArray) => T | undefined) | undefined) => T | undefined +>forEachChild : (cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray) => T | undefined) => T | undefined >cbNode : (node: Node) => T | undefined >node : Node >cbNodeArray : ((nodes: NodeArray) => T | undefined) | undefined diff --git a/tests/baselines/reference/inferenceOptionalProperties.types b/tests/baselines/reference/inferenceOptionalProperties.types index a31c9c350bf7c..23c6edc450770 100644 --- a/tests/baselines/reference/inferenceOptionalProperties.types +++ b/tests/baselines/reference/inferenceOptionalProperties.types @@ -2,7 +2,7 @@ === inferenceOptionalProperties.ts === declare function test(x: { [key: string]: T }): T; ->test : (x: { [key: string]: T; }) => T +>test : (x: { [key: string]: T;}) => T >x : { [key: string]: T; } >key : string diff --git a/tests/baselines/reference/inferenceOptionalPropertiesStrict.types b/tests/baselines/reference/inferenceOptionalPropertiesStrict.types index 0e42a10b2a432..01cca0a641f6b 100644 --- a/tests/baselines/reference/inferenceOptionalPropertiesStrict.types +++ b/tests/baselines/reference/inferenceOptionalPropertiesStrict.types @@ -2,7 +2,7 @@ === inferenceOptionalPropertiesStrict.ts === declare function test(x: { [key: string]: T }): T; ->test : (x: { [key: string]: T; }) => T +>test : (x: { [key: string]: T;}) => T >x : { [key: string]: T; } >key : string diff --git a/tests/baselines/reference/inferenceOptionalPropertiesToIndexSignatures.types b/tests/baselines/reference/inferenceOptionalPropertiesToIndexSignatures.types index d882f908a34b2..e018bf014d15f 100644 --- a/tests/baselines/reference/inferenceOptionalPropertiesToIndexSignatures.types +++ b/tests/baselines/reference/inferenceOptionalPropertiesToIndexSignatures.types @@ -2,7 +2,7 @@ === inferenceOptionalPropertiesToIndexSignatures.ts === declare function foo(obj: { [x: string]: T }): T; ->foo : (obj: { [x: string]: T; }) => T +>foo : (obj: { [x: string]: T;}) => T >obj : { [x: string]: T; } >x : string diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types index a6f8ee49178b9..22f16e3857501 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types @@ -2,9 +2,9 @@ === inferentialTypingWithFunctionTypeNested.ts === declare function map(x: T, f: () => { x: (s: T) => U }): U; ->map : (x: T, f: () => { x: (s: T) => U; }) => U +>map : (x: T, f: () => { x: (s: T) => U;}) => U >x : T ->f : () => { x: (s: T) => U; } +>f : () => { x: (s: T) => U;} >x : (s: T) => U >s : T diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types b/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types index 6f6794341460c..b3f36c1eb9ae2 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.types @@ -2,7 +2,7 @@ === inferentialTypingWithFunctionTypeZip.ts === var pair: (x: T) => (y: S) => { x: T; y: S; } ->pair : (x: T) => (y: S) => { x: T; y: S; } +>pair : (x: T) => (y: S) => { x: T; y: S;} >x : T >y : S >x : T diff --git a/tests/baselines/reference/inferingFromAny.types b/tests/baselines/reference/inferingFromAny.types index a022326b86517..363567a2d7f32 100644 --- a/tests/baselines/reference/inferingFromAny.types +++ b/tests/baselines/reference/inferingFromAny.types @@ -49,12 +49,12 @@ declare function f9(x: new () => T): T; >x : new () => T declare function f10(x: { [x: string]: T }): T; ->f10 : (x: { [x: string]: T; }) => T +>f10 : (x: { [x: string]: T;}) => T >x : { [x: string]: T; } >x : string declare function f11(x: { [x: number]: T }): T; ->f11 : (x: { [x: number]: T; }) => T +>f11 : (x: { [x: number]: T;}) => T >x : { [x: number]: T; } >x : number diff --git a/tests/baselines/reference/inferredIndexerOnNamespaceImport.types b/tests/baselines/reference/inferredIndexerOnNamespaceImport.types index 1935a3a7c1f3e..61f3989968ca6 100644 --- a/tests/baselines/reference/inferredIndexerOnNamespaceImport.types +++ b/tests/baselines/reference/inferredIndexerOnNamespaceImport.types @@ -14,7 +14,7 @@ import * as foo from "./foo"; >foo : typeof foo function f(map: { [k: string]: number }) { ->f : (map: { [k: string]: number; }) => void +>f : (map: { [k: string]: number;}) => void >map : { [k: string]: number; } >k : string diff --git a/tests/baselines/reference/inferrenceInfiniteLoopWithSubtyping.types b/tests/baselines/reference/inferrenceInfiniteLoopWithSubtyping.types index 6a8632ec2a38d..3bb85736896c4 100644 --- a/tests/baselines/reference/inferrenceInfiniteLoopWithSubtyping.types +++ b/tests/baselines/reference/inferrenceInfiniteLoopWithSubtyping.types @@ -15,7 +15,7 @@ export class EnumTypeComposer { >EnumTypeComposer : EnumTypeComposer public setFields(fields: { [name: string]: { [key: string]: any } }): this; ->setFields : (fields: { [name: string]: { [key: string]: any; }; }) => this +>setFields : (fields: { [name: string]: { [key: string]: any; };}) => this >fields : { [name: string]: { [key: string]: any; }; } >name : string >key : string @@ -38,10 +38,10 @@ export class Resolver { >Resolver : Resolver public wrapArgs( ->wrapArgs : (cb: () => { [argName: string]: Thunk>; }) => void +>wrapArgs : (cb: () => { [argName: string]: Thunk>;}) => void cb: () => { ->cb : () => { [argName: string]: Thunk>; } +>cb : () => { [argName: string]: Thunk>;} [argName: string]: Thunk>; >argName : string diff --git a/tests/baselines/reference/innerTypeCheckOfLambdaArgument.types b/tests/baselines/reference/innerTypeCheckOfLambdaArgument.types index fe0e4bb9d6c5e..267fc89f6ff6f 100644 --- a/tests/baselines/reference/innerTypeCheckOfLambdaArgument.types +++ b/tests/baselines/reference/innerTypeCheckOfLambdaArgument.types @@ -2,7 +2,7 @@ === innerTypeCheckOfLambdaArgument.ts === function takesCallback(callback: (n) =>any) { ->takesCallback : (callback: (n: any) => any) => void +>takesCallback : (callback: (n) => any) => void >callback : (n: any) => any >n : any diff --git a/tests/baselines/reference/instantiateContextualTypes.types b/tests/baselines/reference/instantiateContextualTypes.types index 24ba01d0a5b85..c49fd57ad2213 100644 --- a/tests/baselines/reference/instantiateContextualTypes.types +++ b/tests/baselines/reference/instantiateContextualTypes.types @@ -67,7 +67,7 @@ new GenericComponent({ initialValues: 12, nextValues: val => 12 }); // #22149 declare function useStringOrNumber(t: T, useIt: T extends string ? ((s: string) => void) : ((n: number) => void)): void; ->useStringOrNumber : (t: T, useIt: T extends string ? (s: string) => void : (n: number) => void) => void +>useStringOrNumber : (t: T, useIt: T extends string ? ((s: string) => void) : ((n: number) => void)) => void >t : T >useIt : T extends string ? (s: string) => void : (n: number) => void >s : string diff --git a/tests/baselines/reference/intraExpressionInferences.types b/tests/baselines/reference/intraExpressionInferences.types index e38c271c8614a..fecbbbba069de 100644 --- a/tests/baselines/reference/intraExpressionInferences.types +++ b/tests/baselines/reference/intraExpressionInferences.types @@ -4,7 +4,7 @@ // Repros from #47599 declare function callIt(obj: { ->callIt : (obj: { produce: (n: number) => T; consume: (x: T) => void; }) => void +>callIt : (obj: { produce: (n: number) => T; consume: (x: T) => void;}) => void >obj : { produce: (n: number) => T; consume: (x: T) => void; } produce: (n: number) => T, @@ -160,7 +160,7 @@ const myGeneric = inferTypeFn({ // Repro #38623 function make(o: { mutations: M, action: (m: M) => void }) { } ->make : (o: { mutations: M; action: (m: M) => void; }) => void +>make : (o: { mutations: M; action: (m: M) => void;}) => void >o : { mutations: M; action: (m: M) => void; } >mutations : M >action : (m: M) => void @@ -193,7 +193,7 @@ make({ // Repro from #38845 declare function foo(options: { a: A, b: (a: A) => void }): void; ->foo : (options: { a: A; b: (a: A) => void; }) => void +>foo : (options: { a: A; b: (a: A) => void;}) => void >options : { a: A; b: (a: A) => void; } >a : A >b : (a: A) => void @@ -425,14 +425,14 @@ createMappingComponent({ // Repro from #48279 function simplified(props: { generator: () => T, receiver: (t: T) => any }) {} ->simplified : (props: { generator: () => T; receiver: (t: T) => any; }) => void +>simplified : (props: { generator: () => T; receiver: (t: T) => any;}) => void >props : { generator: () => T; receiver: (t: T) => any; } >generator : () => T >receiver : (t: T) => any >t : T function whatIWant(props: { generator: (bob: any) => T, receiver: (t: T) => any }) {} ->whatIWant : (props: { generator: (bob: any) => T; receiver: (t: T) => any; }) => void +>whatIWant : (props: { generator: (bob: any) => T; receiver: (t: T) => any;}) => void >props : { generator: (bob: any) => T; receiver: (t: T) => any; } >generator : (bob: any) => T >bob : any @@ -620,7 +620,7 @@ example({ // Repro from #45255 declare const branch: ->branch : (_: { test: T; if: (t: T) => t is U; then: (u: U) => void; }) => void +>branch : (_: { test: T; if: (t: T) => t is U; then: (u: U) => void;}) => void (_: { test: T, if: (t: T) => t is U, then: (u: U) => void }) => void >_ : { test: T; if: (t: T) => t is U; then: (u: U) => void; } @@ -705,8 +705,8 @@ Foo({ }); declare function nested(arg: { ->nested : (arg: { prop: { produce: (arg1: number) => T; consume: (arg2: T) => void; }; }) => T ->arg : { prop: { produce: (arg1: number) => T; consume: (arg2: T) => void; }; } +>nested : (arg: { prop: { produce: (arg1: number) => T; consume: (arg2: T) => void; };}) => T +>arg : { prop: { produce: (arg1: number) => T; consume: (arg2: T) => void;}; } prop: { >prop : { produce: (arg1: number) => T; consume: (arg2: T) => void; } @@ -753,7 +753,7 @@ const resNested = nested({ }); declare function twoConsumers(arg: { ->twoConsumers : (arg: { a: (arg: string) => T; consume1: (arg1: T) => void; consume2: (arg2: T) => void; }) => T +>twoConsumers : (arg: { a: (arg: string) => T; consume1: (arg1: T) => void; consume2: (arg2: T) => void;}) => T >arg : { a: (arg: string) => T; consume1: (arg1: T) => void; consume2: (arg2: T) => void; } a: (arg: string) => T; @@ -796,7 +796,7 @@ const resTwoConsumers = twoConsumers({ }); declare function multipleProducersBeforeConsumers(arg: { ->multipleProducersBeforeConsumers : (arg: { a: (arg: string) => T; b: (arg: string) => T2; consume1: (arg1: T) => void; consume2: (arg2: T2) => void; }) => [T, T2] +>multipleProducersBeforeConsumers : (arg: { a: (arg: string) => T; b: (arg: string) => T2; consume1: (arg1: T) => void; consume2: (arg2: T2) => void;}) => [T, T2] >arg : { a: (arg: string) => T; b: (arg: string) => T2; consume1: (arg1: T) => void; consume2: (arg2: T2) => void; } a: (arg: string) => T; @@ -851,7 +851,7 @@ const resMultipleProducersBeforeConsumers = multipleProducersBeforeConsumers({ }); declare function withConditionalExpression(arg: { ->withConditionalExpression : (arg: { a: (arg1: string) => T; b: (arg2: T) => T2; c: (arg2: T2) => T3; }) => [T, T2, T3] +>withConditionalExpression : (arg: { a: (arg1: string) => T; b: (arg2: T) => T2; c: (arg2: T2) => T3;}) => [T, T2, T3] >arg : { a: (arg1: string) => T; b: (arg2: T) => T2; c: (arg2: T2) => T3; } a: (arg1: string) => T; @@ -908,15 +908,15 @@ const resWithConditionalExpression = withConditionalExpression({ }); declare function onion(arg: { ->onion : (arg: { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; nested2: { c: (arg2: T2) => T3; }; }; }) => [T, T2, T3] ->arg : { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; nested2: { c: (arg2: T2) => T3; }; }; } +>onion : (arg: { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; nested2: { c: (arg2: T2) => T3; }; };}) => [T, T2, T3] +>arg : { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; nested2: { c: (arg2: T2) => T3; };}; } a: (arg1: string) => T; >a : (arg1: string) => T >arg1 : string nested: { ->nested : { b: (arg2: T) => T2; nested2: { c: (arg2: T2) => T3; }; } +>nested : { b: (arg2: T) => T2; nested2: { c: (arg2: T2) => T3;}; } b: (arg2: T) => T2; >b : (arg2: T) => T2 @@ -977,15 +977,15 @@ const resOnion = onion({ }); declare function onion2(arg: { ->onion2 : (arg: { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; c: (arg3: T) => T3; nested2: { d: (arg4: T3) => T4; }; }; }) => [T, T2, T3, T4] ->arg : { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; c: (arg3: T) => T3; nested2: { d: (arg4: T3) => T4; }; }; } +>onion2 : (arg: { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; c: (arg3: T) => T3; nested2: { d: (arg4: T3) => T4; }; };}) => [T, T2, T3, T4] +>arg : { a: (arg1: string) => T; nested: { b: (arg2: T) => T2; c: (arg3: T) => T3; nested2: { d: (arg4: T3) => T4; };}; } a: (arg1: string) => T; >a : (arg1: string) => T >arg1 : string nested: { ->nested : { b: (arg2: T) => T2; c: (arg3: T) => T3; nested2: { d: (arg4: T3) => T4; }; } +>nested : { b: (arg2: T) => T2; c: (arg3: T) => T3; nested2: { d: (arg4: T3) => T4;}; } b: (arg2: T) => T2; >b : (arg2: T) => T2 @@ -1058,14 +1058,14 @@ const resOnion2 = onion2({ }); declare function distant(args: { ->distant : (args: { foo: { bar: { baz: { producer: (arg: string) => T; }; }; }; consumer: (val: T) => unknown; }) => T ->args : { foo: { bar: { baz: { producer: (arg: string) => T; }; }; }; consumer: (val: T) => unknown; } +>distant : (args: { foo: { bar: { baz: { producer: (arg: string) => T; }; }; }; consumer: (val: T) => unknown;}) => T +>args : { foo: { bar: { baz: { producer: (arg: string) => T; }; };}; consumer: (val: T) => unknown; } foo: { ->foo : { bar: { baz: { producer: (arg: string) => T; }; }; } +>foo : { bar: { baz: { producer: (arg: string) => T; };}; } bar: { ->bar : { baz: { producer: (arg: string) => T; }; } +>bar : { baz: { producer: (arg: string) => T;}; } baz: { >baz : { producer: (arg: string) => T; } diff --git a/tests/baselines/reference/isomorphicMappedTypeInference.types b/tests/baselines/reference/isomorphicMappedTypeInference.types index 32b74150e53ee..91b2d3fc83555 100644 --- a/tests/baselines/reference/isomorphicMappedTypeInference.types +++ b/tests/baselines/reference/isomorphicMappedTypeInference.types @@ -317,7 +317,7 @@ function f5(s: string) { } function makeDictionary(obj: { [x: string]: T }) { ->makeDictionary : (obj: { [x: string]: T; }) => { [x: string]: T; } +>makeDictionary : (obj: { [x: string]: T;}) => { [x: string]: T; } >obj : { [x: string]: T; } >x : string diff --git a/tests/baselines/reference/jsDeclarationsImportAliasExposedWithinNamespace.js b/tests/baselines/reference/jsDeclarationsImportAliasExposedWithinNamespace.js index b600a72f5cd6b..f08a35dfa3a3d 100644 --- a/tests/baselines/reference/jsDeclarationsImportAliasExposedWithinNamespace.js +++ b/tests/baselines/reference/jsDeclarationsImportAliasExposedWithinNamespace.js @@ -67,10 +67,15 @@ export namespace myTypes { prop2: string; }; type typeC = myTypes.typeB | Function; - let myTypes: { - [x: string]: any; - }; } +/** + * @namespace myTypes + * @global + * @type {Object} + */ +export const myTypes: { + [x: string]: any; +}; //// [file2.d.ts] export namespace testFnTypes { type input = boolean | myTypes.typeC; diff --git a/tests/baselines/reference/jsxChildrenGenericContextualTypes.types b/tests/baselines/reference/jsxChildrenGenericContextualTypes.types index 01bf65beb0045..ceb6da2de0364 100644 --- a/tests/baselines/reference/jsxChildrenGenericContextualTypes.types +++ b/tests/baselines/reference/jsxChildrenGenericContextualTypes.types @@ -14,8 +14,8 @@ namespace JSX { >key : string } const Elem = (p: { prop: T, children: (t: T) => T }) =>
; ->Elem : (p: { prop: T; children: (t: T) => T; }) => JSX.Element ->(p: { prop: T, children: (t: T) => T }) =>
: (p: { prop: T; children: (t: T) => T; }) => JSX.Element +>Elem : (p: { prop: T; children: (t: T) => T;}) => JSX.Element +>(p: { prop: T, children: (t: T) => T }) =>
: (p: { prop: T; children: (t: T) => T;}) => JSX.Element >p : { prop: T; children: (t: T) => T; } >prop : T >children : (t: T) => T diff --git a/tests/baselines/reference/jsxComplexSignatureHasApplicabilityError.types b/tests/baselines/reference/jsxComplexSignatureHasApplicabilityError.types index 56342bfc23c12..95e495fb6bf75 100644 --- a/tests/baselines/reference/jsxComplexSignatureHasApplicabilityError.types +++ b/tests/baselines/reference/jsxComplexSignatureHasApplicabilityError.types @@ -159,7 +159,7 @@ export type FilterOptionsHandler = (options: OptionscurrentValues : Options export type InputRendererHandler = (props: { [key: string]: any }) => HandlerRendererResult; ->InputRendererHandler : (props: { [key: string]: any; }) => HandlerRendererResult +>InputRendererHandler : (props: { [key: string]: any;}) => HandlerRendererResult >props : { [key: string]: any; } >key : string diff --git a/tests/baselines/reference/jsxElementType.types b/tests/baselines/reference/jsxElementType.types index 36a03d571128f..9da500e29f47f 100644 --- a/tests/baselines/reference/jsxElementType.types +++ b/tests/baselines/reference/jsxElementType.types @@ -57,8 +57,8 @@ let Component: NewReactJSXElementConstructor<{ title: string }>; >title : string const RenderElement = ({ title }: { title: string }) =>
{title}
; ->RenderElement : ({ title }: { title: string; }) => JSX.Element ->({ title }: { title: string }) =>
{title}
: ({ title }: { title: string; }) => JSX.Element +>RenderElement : ({ title }: { title: string;}) => JSX.Element +>({ title }: { title: string }) =>
{title}
: ({ title }: { title: string;}) => JSX.Element >title : string >title : string >
{title}
: JSX.Element @@ -86,8 +86,8 @@ Component = RenderElement; >excessProp : true const RenderString = ({ title }: { title: string }) => title; ->RenderString : ({ title }: { title: string; }) => string ->({ title }: { title: string }) => title : ({ title }: { title: string; }) => string +>RenderString : ({ title }: { title: string;}) => string +>({ title }: { title: string }) => title : ({ title }: { title: string;}) => string >title : string >title : string >title : string @@ -112,8 +112,8 @@ Component = RenderString; >excessProp : true const RenderNumber = ({ title }: { title: string }) => title.length; ->RenderNumber : ({ title }: { title: string; }) => number ->({ title }: { title: string }) => title.length : ({ title }: { title: string; }) => number +>RenderNumber : ({ title }: { title: string;}) => number +>({ title }: { title: string }) => title.length : ({ title }: { title: string;}) => number >title : string >title : string >title.length : number @@ -140,8 +140,8 @@ Component = RenderNumber; >excessProp : true const RenderArray = ({ title }: { title: string }) => [title]; ->RenderArray : ({ title }: { title: string; }) => string[] ->({ title }: { title: string }) => [title] : ({ title }: { title: string; }) => string[] +>RenderArray : ({ title }: { title: string;}) => string[] +>({ title }: { title: string }) => [title] : ({ title }: { title: string;}) => string[] >title : string >title : string >[title] : string[] @@ -168,8 +168,8 @@ Component = RenderArray; // React Server Component const RenderPromise = async ({ title }: { title: string }) => "react"; ->RenderPromise : ({ title }: { title: string; }) => Promise ->async ({ title }: { title: string }) => "react" : ({ title }: { title: string; }) => Promise +>RenderPromise : ({ title }: { title: string;}) => Promise +>async ({ title }: { title: string }) => "react" : ({ title }: { title: string;}) => Promise >title : string >title : string >"react" : "react" diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index d1aca03181660..8b154af7ee27c 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -651,7 +651,7 @@ function f51(k: K, s: string) { } function f52(obj: { [x: string]: boolean }, k: Exclude, s: string, n: number) { ->f52 : (obj: { [x: string]: boolean; }, k: Exclude, s: string, n: number) => void +>f52 : (obj: { [x: string]: boolean;}, k: Exclude, s: string, n: number) => void >obj : { [x: string]: boolean; } >x : string >k : Exclude @@ -678,7 +678,7 @@ function f52(obj: { [x: string]: boolean }, k: Exclude, s: s } function f53>(obj: { [x: string]: boolean }, k: K, s: string, n: number) { ->f53 : >(obj: { [x: string]: boolean; }, k: K, s: string, n: number) => void +>f53 : >(obj: { [x: string]: boolean;}, k: K, s: string, n: number) => void >obj : { [x: string]: boolean; } >x : string >k : K @@ -1776,7 +1776,7 @@ function updateIds, K extends string>( // Repro from #13285 function updateIds2( ->updateIds2 : (obj: T, key: K, stringMap: { [oldId: string]: string; }) => void +>updateIds2 : (obj: T, key: K, stringMap: { [oldId: string]: string;}) => void >x : string obj: T, diff --git a/tests/baselines/reference/keyofAndIndexedAccess2.types b/tests/baselines/reference/keyofAndIndexedAccess2.types index b0ec73165f6e6..da43703c72ce1 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess2.types +++ b/tests/baselines/reference/keyofAndIndexedAccess2.types @@ -76,7 +76,7 @@ function f1(obj: { a: number, b: 0 | 1, c: string }, k0: 'a', k1: 'a' | 'b', k2: } function f2(a: { x: number, y: number }, b: { [key: string]: number }, c: T, k: keyof T) { ->f2 : (a: { x: number; y: number;}, b: { [key: string]: number; }, c: T, k: keyof T) => void +>f2 : (a: { x: number; y: number;}, b: { [key: string]: number;}, c: T, k: keyof T) => void >key : string >a : { x: number; y: number; } >x : number @@ -166,7 +166,7 @@ function f2(a: { x: number, y: number }, b: } function f3(a: { [P in K]: number }, b: { [key: string]: number }, k: K) { ->f3 : (a: { [P in K]: number; }, b: { [key: string]: number; }, k: K) => void +>f3 : (a: { [P in K]: number; }, b: { [key: string]: number;}, k: K) => void >a : { [P in K]: number; } >b : { [key: string]: number; } >key : string @@ -213,7 +213,7 @@ function f3b(a: { [P in K]: number }, b: { [P in string]: numb } function f4(a: { [key: string]: number }[K], b: number) { ->f4 : (a: number, b: number) => void +>f4 : (a: { [key: string]: number;}[K], b: number) => void >a : number >key : string >b : number diff --git a/tests/baselines/reference/logicalAssignment5(target=es2015).types b/tests/baselines/reference/logicalAssignment5(target=es2015).types index 288026e606178..d4be6e09c6ab2 100644 --- a/tests/baselines/reference/logicalAssignment5(target=es2015).types +++ b/tests/baselines/reference/logicalAssignment5(target=es2015).types @@ -2,7 +2,7 @@ === logicalAssignment5.ts === function foo1 (f?: (a: number) => void) { ->foo1 : (f?: ((a: number) => void) | undefined) => void +>foo1 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -21,7 +21,7 @@ function foo1 (f?: (a: number) => void) { } function foo2 (f?: (a: number) => void) { ->foo2 : (f?: ((a: number) => void) | undefined) => void +>foo2 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -40,7 +40,7 @@ function foo2 (f?: (a: number) => void) { } function foo3 (f?: (a: number) => void) { ->foo3 : (f?: ((a: number) => void) | undefined) => void +>foo3 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -59,7 +59,7 @@ function foo3 (f?: (a: number) => void) { } function bar1 (f?: (a: number) => void) { ->bar1 : (f?: ((a: number) => void) | undefined) => void +>bar1 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -84,7 +84,7 @@ function bar1 (f?: (a: number) => void) { } function bar2 (f?: (a: number) => void) { ->bar2 : (f?: ((a: number) => void) | undefined) => void +>bar2 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -109,7 +109,7 @@ function bar2 (f?: (a: number) => void) { } function bar3 (f?: (a: number) => void) { ->bar3 : (f?: ((a: number) => void) | undefined) => void +>bar3 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number diff --git a/tests/baselines/reference/logicalAssignment5(target=es2020).types b/tests/baselines/reference/logicalAssignment5(target=es2020).types index 288026e606178..d4be6e09c6ab2 100644 --- a/tests/baselines/reference/logicalAssignment5(target=es2020).types +++ b/tests/baselines/reference/logicalAssignment5(target=es2020).types @@ -2,7 +2,7 @@ === logicalAssignment5.ts === function foo1 (f?: (a: number) => void) { ->foo1 : (f?: ((a: number) => void) | undefined) => void +>foo1 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -21,7 +21,7 @@ function foo1 (f?: (a: number) => void) { } function foo2 (f?: (a: number) => void) { ->foo2 : (f?: ((a: number) => void) | undefined) => void +>foo2 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -40,7 +40,7 @@ function foo2 (f?: (a: number) => void) { } function foo3 (f?: (a: number) => void) { ->foo3 : (f?: ((a: number) => void) | undefined) => void +>foo3 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -59,7 +59,7 @@ function foo3 (f?: (a: number) => void) { } function bar1 (f?: (a: number) => void) { ->bar1 : (f?: ((a: number) => void) | undefined) => void +>bar1 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -84,7 +84,7 @@ function bar1 (f?: (a: number) => void) { } function bar2 (f?: (a: number) => void) { ->bar2 : (f?: ((a: number) => void) | undefined) => void +>bar2 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -109,7 +109,7 @@ function bar2 (f?: (a: number) => void) { } function bar3 (f?: (a: number) => void) { ->bar3 : (f?: ((a: number) => void) | undefined) => void +>bar3 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number diff --git a/tests/baselines/reference/logicalAssignment5(target=es2021).types b/tests/baselines/reference/logicalAssignment5(target=es2021).types index 288026e606178..d4be6e09c6ab2 100644 --- a/tests/baselines/reference/logicalAssignment5(target=es2021).types +++ b/tests/baselines/reference/logicalAssignment5(target=es2021).types @@ -2,7 +2,7 @@ === logicalAssignment5.ts === function foo1 (f?: (a: number) => void) { ->foo1 : (f?: ((a: number) => void) | undefined) => void +>foo1 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -21,7 +21,7 @@ function foo1 (f?: (a: number) => void) { } function foo2 (f?: (a: number) => void) { ->foo2 : (f?: ((a: number) => void) | undefined) => void +>foo2 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -40,7 +40,7 @@ function foo2 (f?: (a: number) => void) { } function foo3 (f?: (a: number) => void) { ->foo3 : (f?: ((a: number) => void) | undefined) => void +>foo3 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -59,7 +59,7 @@ function foo3 (f?: (a: number) => void) { } function bar1 (f?: (a: number) => void) { ->bar1 : (f?: ((a: number) => void) | undefined) => void +>bar1 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -84,7 +84,7 @@ function bar1 (f?: (a: number) => void) { } function bar2 (f?: (a: number) => void) { ->bar2 : (f?: ((a: number) => void) | undefined) => void +>bar2 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -109,7 +109,7 @@ function bar2 (f?: (a: number) => void) { } function bar3 (f?: (a: number) => void) { ->bar3 : (f?: ((a: number) => void) | undefined) => void +>bar3 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number diff --git a/tests/baselines/reference/logicalAssignment5(target=esnext).types b/tests/baselines/reference/logicalAssignment5(target=esnext).types index 288026e606178..d4be6e09c6ab2 100644 --- a/tests/baselines/reference/logicalAssignment5(target=esnext).types +++ b/tests/baselines/reference/logicalAssignment5(target=esnext).types @@ -2,7 +2,7 @@ === logicalAssignment5.ts === function foo1 (f?: (a: number) => void) { ->foo1 : (f?: ((a: number) => void) | undefined) => void +>foo1 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -21,7 +21,7 @@ function foo1 (f?: (a: number) => void) { } function foo2 (f?: (a: number) => void) { ->foo2 : (f?: ((a: number) => void) | undefined) => void +>foo2 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -40,7 +40,7 @@ function foo2 (f?: (a: number) => void) { } function foo3 (f?: (a: number) => void) { ->foo3 : (f?: ((a: number) => void) | undefined) => void +>foo3 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -59,7 +59,7 @@ function foo3 (f?: (a: number) => void) { } function bar1 (f?: (a: number) => void) { ->bar1 : (f?: ((a: number) => void) | undefined) => void +>bar1 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -84,7 +84,7 @@ function bar1 (f?: (a: number) => void) { } function bar2 (f?: (a: number) => void) { ->bar2 : (f?: ((a: number) => void) | undefined) => void +>bar2 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number @@ -109,7 +109,7 @@ function bar2 (f?: (a: number) => void) { } function bar3 (f?: (a: number) => void) { ->bar3 : (f?: ((a: number) => void) | undefined) => void +>bar3 : (f?: (a: number) => void) => void >f : ((a: number) => void) | undefined >a : number diff --git a/tests/baselines/reference/methodSignaturesWithOverloads.types b/tests/baselines/reference/methodSignaturesWithOverloads.types index c216519d3a4bf..91f95a13b31e6 100644 --- a/tests/baselines/reference/methodSignaturesWithOverloads.types +++ b/tests/baselines/reference/methodSignaturesWithOverloads.types @@ -4,7 +4,7 @@ // Object type literals permit overloads with optionality but they must match var c: { ->c : { func4?(x: number): number; func4?(s: string): string; func5?: { (x: number): number; (s: string): string; }; } +>c : { func4?(x: number): number; func4?(s: string): string; func5?: { (x: number): number; (s: string): string;}; } func4?(x: number): number; >func4 : { (x: number): number; (s: string): string; } diff --git a/tests/baselines/reference/methodSignaturesWithOverloads2.types b/tests/baselines/reference/methodSignaturesWithOverloads2.types index 2dead056a2c0a..9ebf4942cef0c 100644 --- a/tests/baselines/reference/methodSignaturesWithOverloads2.types +++ b/tests/baselines/reference/methodSignaturesWithOverloads2.types @@ -4,7 +4,7 @@ // Object type literals permit overloads with optionality but they must match var c: { ->c : { func4?(x: number): number; func4?(s: string): string; func5?: { (x: number): number; (s: string): string; }; } +>c : { func4?(x: number): number; func4?(s: string): string; func5?: { (x: number): number; (s: string): string;}; } func4?(x: number): number; >func4 : { (x: number): number; (s: string): string; } diff --git a/tests/baselines/reference/namedTupleMembers.types b/tests/baselines/reference/namedTupleMembers.types index 5ce7ecd46815b..ba22af0c3a80b 100644 --- a/tests/baselines/reference/namedTupleMembers.types +++ b/tests/baselines/reference/namedTupleMembers.types @@ -102,7 +102,7 @@ export const func = null as any as Func; >null as any : any export function useState(initial: T): [value: T, setter: (T) => void] { ->useState : (initial: T) => [value: T, setter: (T: any) => void] +>useState : (initial: T) => [value: T, setter: (T) => void] >initial : T >T : any diff --git a/tests/baselines/reference/noImplicitReturnsExclusions.types b/tests/baselines/reference/noImplicitReturnsExclusions.types index 9ee2be8951683..06d9bfa7d3731 100644 --- a/tests/baselines/reference/noImplicitReturnsExclusions.types +++ b/tests/baselines/reference/noImplicitReturnsExclusions.types @@ -147,7 +147,7 @@ declare class HistoryItem { interface Thenable { then( ->then : { (onfulfilled?: ((value: T) => TResult | Thenable) | undefined, onrejected?: ((reason: any) => TResult | Thenable) | undefined): Thenable; (onfulfilled?: ((value: T) => TResult_1 | Thenable) | undefined, onrejected?: ((reason: any) => void) | undefined): Thenable; } +>then : { (onfulfilled?: (value: T) => TResult | Thenable, onrejected?: (reason: any) => TResult | Thenable): Thenable; (onfulfilled?: ((value: T) => TResult_1 | Thenable) | undefined, onrejected?: ((reason: any) => void) | undefined): Thenable; } onfulfilled?: (value: T) => TResult | Thenable, >onfulfilled : ((value: T) => TResult | Thenable) | undefined @@ -159,7 +159,7 @@ interface Thenable { ): Thenable; then( ->then : { (onfulfilled?: ((value: T) => TResult_1 | Thenable) | undefined, onrejected?: ((reason: any) => TResult_1 | Thenable) | undefined): Thenable; (onfulfilled?: ((value: T) => TResult | Thenable) | undefined, onrejected?: ((reason: any) => void) | undefined): Thenable; } +>then : { (onfulfilled?: ((value: T) => TResult_1 | Thenable) | undefined, onrejected?: ((reason: any) => TResult_1 | Thenable) | undefined): Thenable; (onfulfilled?: (value: T) => TResult | Thenable, onrejected?: (reason: any) => void): Thenable; } onfulfilled?: (value: T) => TResult | Thenable, >onfulfilled : ((value: T) => TResult | Thenable) | undefined diff --git a/tests/baselines/reference/observableInferenceCanBeMade.types b/tests/baselines/reference/observableInferenceCanBeMade.types index a3124e5fd9fb8..a82a69d21049e 100644 --- a/tests/baselines/reference/observableInferenceCanBeMade.types +++ b/tests/baselines/reference/observableInferenceCanBeMade.types @@ -16,7 +16,7 @@ type ObservedValueOf = O extends ObservableInput ? T : never; interface Subscribable { subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): void; ->subscribe : (next?: ((value: T) => void) | undefined, error?: ((error: any) => void) | undefined, complete?: () => void) => void +>subscribe : (next?: (value: T) => void, error?: (error: any) => void, complete?: () => void) => void >next : ((value: T) => void) | undefined >value : T >error : ((error: any) => void) | undefined @@ -31,7 +31,7 @@ declare class Observable implements Subscribable { >Observable : Observable subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): void; ->subscribe : (next?: ((value: T) => void) | undefined, error?: ((error: any) => void) | undefined, complete?: () => void) => void +>subscribe : (next?: (value: T) => void, error?: (error: any) => void, complete?: () => void) => void >next : ((value: T) => void) | undefined >value : T >error : ((error: any) => void) | undefined diff --git a/tests/baselines/reference/override19.types b/tests/baselines/reference/override19.types index 8aa0d3c811bed..12a116f046b63 100644 --- a/tests/baselines/reference/override19.types +++ b/tests/baselines/reference/override19.types @@ -6,7 +6,7 @@ type Foo = abstract new(...args: any) => any; >args : any declare function CreateMixin(Context: C, Base: T): T & { ->CreateMixin : (Context: C, Base: T) => T & (new (...args: any[]) => { context: InstanceType;}) +>CreateMixin : (Context: C, Base: T) => T & { new (...args: any[]): { context: InstanceType; };} >Context : C >Base : T diff --git a/tests/baselines/reference/parserParameterList5.types b/tests/baselines/reference/parserParameterList5.types index cc64f785b60f2..1497a6cd3a244 100644 --- a/tests/baselines/reference/parserParameterList5.types +++ b/tests/baselines/reference/parserParameterList5.types @@ -2,6 +2,6 @@ === parserParameterList5.ts === function A(): (public B) => C { ->A : () => (B: any) => C +>A : () => (public B) => C >B : any } diff --git a/tests/baselines/reference/parserRealSource4.types b/tests/baselines/reference/parserRealSource4.types index 7bc56dad4d643..bf0940a0af769 100644 --- a/tests/baselines/reference/parserRealSource4.types +++ b/tests/baselines/reference/parserRealSource4.types @@ -66,7 +66,7 @@ module TypeScript { >data : any map(fn: (k: string, v, c) => void , context): void; ->map : (fn: (k: string, v: any, c: any) => void, context: any) => void +>map : (fn: (k: string, v, c) => void, context: any) => void >fn : (k: string, v: any, c: any) => void >k : string >v : any @@ -74,7 +74,7 @@ module TypeScript { >context : any every(fn: (k: string, v, c) => boolean, context): boolean; ->every : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean +>every : (fn: (k: string, v, c) => boolean, context: any) => boolean >fn : (k: string, v: any, c: any) => boolean >k : string >v : any @@ -82,7 +82,7 @@ module TypeScript { >context : any some(fn: (k: string, v, c) => boolean, context): boolean; ->some : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean +>some : (fn: (k: string, v, c) => boolean, context: any) => boolean >fn : (k: string, v: any, c: any) => boolean >k : string >v : any @@ -230,7 +230,7 @@ module TypeScript { } public map(fn: (k: string, v, c) => void , context) { ->map : (fn: (k: string, v: any, c: any) => void, context: any) => void +>map : (fn: (k: string, v, c) => void, context: any) => void >fn : (k: string, v: any, c: any) => void >k : string >v : any @@ -271,7 +271,7 @@ module TypeScript { } public every(fn: (k: string, v, c) => boolean, context) { ->every : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean +>every : (fn: (k: string, v, c) => boolean, context: any) => boolean >fn : (k: string, v: any, c: any) => boolean >k : string >v : any @@ -319,7 +319,7 @@ module TypeScript { } public some(fn: (k: string, v, c) => boolean, context) { ->some : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean +>some : (fn: (k: string, v, c) => boolean, context: any) => boolean >fn : (k: string, v: any, c: any) => boolean >k : string >v : any @@ -502,7 +502,7 @@ module TypeScript { } public map(fn: (k: string, v, c) => void , context) { ->map : (fn: (k: string, v: any, c: any) => void, context: any) => void +>map : (fn: (k: string, v, c) => void, context: any) => void >fn : (k: string, v: any, c: any) => void >k : string >v : any @@ -531,7 +531,7 @@ module TypeScript { } public every(fn: (k: string, v, c) => boolean, context) { ->every : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean +>every : (fn: (k: string, v, c) => boolean, context: any) => boolean >fn : (k: string, v: any, c: any) => boolean >k : string >v : any @@ -559,7 +559,7 @@ module TypeScript { } public some(fn: (k: string, v, c) => boolean, context) { ->some : (fn: (k: string, v: any, c: any) => boolean, context: any) => boolean +>some : (fn: (k: string, v, c) => boolean, context: any) => boolean >fn : (k: string, v: any, c: any) => boolean >k : string >v : any diff --git a/tests/baselines/reference/privateNameInLhsReceiverExpression.types b/tests/baselines/reference/privateNameInLhsReceiverExpression.types index 550cf97a76157..68300b742b0a4 100644 --- a/tests/baselines/reference/privateNameInLhsReceiverExpression.types +++ b/tests/baselines/reference/privateNameInLhsReceiverExpression.types @@ -9,7 +9,7 @@ class Test { >123 : 123 static something(obj: { [key: string]: Test }) { ->something : (obj: { [key: string]: Test; }) => void +>something : (obj: { [key: string]: Test;}) => void >obj : { [key: string]: Test; } >key : string diff --git a/tests/baselines/reference/restTuplesFromContextualTypes.types b/tests/baselines/reference/restTuplesFromContextualTypes.types index a9de22bade988..e668ce861ca26 100644 --- a/tests/baselines/reference/restTuplesFromContextualTypes.types +++ b/tests/baselines/reference/restTuplesFromContextualTypes.types @@ -53,7 +53,7 @@ declare const t1: [number, boolean, string]; >t1 : [number, boolean, string] declare function f1(cb: (...args: typeof t1) => void): void; ->f1 : (cb: (args_0: number, args_1: boolean, args_2: string) => void) => void +>f1 : (cb: (...args: typeof t1) => void) => void >cb : (args_0: number, args_1: boolean, args_2: string) => void >args : [number, boolean, string] >t1 : [number, boolean, string] @@ -148,7 +148,7 @@ declare const t2: [number, boolean, ...string[]]; >t2 : [number, boolean, ...string[]] declare function f2(cb: (...args: typeof t2) => void): void; ->f2 : (cb: (args_0: number, args_1: boolean, ...args_2: string[]) => void) => void +>f2 : (cb: (...args: typeof t2) => void) => void >cb : (args_0: number, args_1: boolean, ...args_2: string[]) => void >args : [number, boolean, ...string[]] >t2 : [number, boolean, ...string[]] @@ -248,7 +248,7 @@ declare const t3: [boolean, ...string[]]; >t3 : [boolean, ...string[]] declare function f3(cb: (x: number, ...args: typeof t3) => void): void; ->f3 : (cb: (x: number, args_0: boolean, ...args_1: string[]) => void) => void +>f3 : (cb: (x: number, ...args: typeof t3) => void) => void >cb : (x: number, args_0: boolean, ...args_1: string[]) => void >x : number >args : [boolean, ...string[]] diff --git a/tests/baselines/reference/returnTypeTypeArguments.types b/tests/baselines/reference/returnTypeTypeArguments.types index 4934a1f1d75d8..d1f68991fc63d 100644 --- a/tests/baselines/reference/returnTypeTypeArguments.types +++ b/tests/baselines/reference/returnTypeTypeArguments.types @@ -137,7 +137,7 @@ class X } declare var a: { ->a : { p1: () => X; p2: { [idx: number]: any; }; p3: X[]; p4: I; p5: any; p6: () => Y; p7: { [idx: number]: any; }; p8: Y[]; p9: I; pa: any; } +>a : { p1: () => X; p2: { [idx: number]: X;}; p3: X[]; p4: I; p5: any; p6: () => Y; p7: { [idx: number]: Y;}; p8: Y[]; p9: I; pa: any; } p1: () => X; >p1 : () => any diff --git a/tests/baselines/reference/reverseMappedPartiallyInferableTypes.types b/tests/baselines/reference/reverseMappedPartiallyInferableTypes.types index eac9cbd9b1c25..aa0aa474b269a 100644 --- a/tests/baselines/reference/reverseMappedPartiallyInferableTypes.types +++ b/tests/baselines/reference/reverseMappedPartiallyInferableTypes.types @@ -47,7 +47,7 @@ export type PropsDefinition = RecordPropsDefinition; declare function extend({ props }: { props: PropsDefinition }): PropsDefinition; ->extend : ({ props }: { props: PropsDefinition; }) => PropsDefinition +>extend : ({ props }: { props: PropsDefinition;}) => PropsDefinition >props : RecordPropsDefinition >props : RecordPropsDefinition diff --git a/tests/baselines/reference/reverseMappedUnionInference.types b/tests/baselines/reference/reverseMappedUnionInference.types index 6eb20a8c8ce1d..c2614e63d5593 100644 --- a/tests/baselines/reference/reverseMappedUnionInference.types +++ b/tests/baselines/reference/reverseMappedUnionInference.types @@ -22,7 +22,7 @@ interface Extractor { } declare function createExtractor(params: { ->createExtractor : (params: { matcher: (node: unknown) => node is T; extract: (node: T) => Result; }) => Extractor +>createExtractor : (params: { matcher: (node: unknown) => node is T; extract: (node: T) => Result;}) => Extractor >params : { matcher: (node: unknown) => node is T; extract: (node: T) => Result; } matcher: (node: unknown) => node is T; diff --git a/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.types b/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.types index 2a798477a1880..f6643f5281bf2 100644 --- a/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.types +++ b/tests/baselines/reference/specializedSignatureOverloadReturnTypeWithIndexers.types @@ -3,45 +3,45 @@ === specializedSignatureOverloadReturnTypeWithIndexers.ts === interface A { f(p: string): { [p: string]: string; }; ->f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: string]: any; }; } +>f : { (p: string): { [p: string]: string;}; (p: "spec"): { [p: string]: any; }; } >p : string >p : string f(p: "spec"): { [p: string]: any; } // Should be ok ->f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: string]: any; }; } +>f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: string]: any;}; } >p : "spec" >p : string } interface B { f(p: string): { [p: number]: string; }; ->f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: string]: any; }; } +>f : { (p: string): { [p: number]: string;}; (p: "spec"): { [p: string]: any; }; } >p : string >p : number f(p: "spec"): { [p: string]: any; } // Should be ok ->f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: string]: any; }; } +>f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: string]: any;}; } >p : "spec" >p : string } interface C { f(p: string): { [p: number]: string; }; ->f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: number]: any; }; } +>f : { (p: string): { [p: number]: string;}; (p: "spec"): { [p: number]: any; }; } >p : string >p : number f(p: "spec"): { [p: number]: any; } // Should be ok ->f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: number]: any; }; } +>f : { (p: string): { [p: number]: string; }; (p: "spec"): { [p: number]: any;}; } >p : "spec" >p : number } interface D { f(p: string): { [p: string]: string; }; ->f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: number]: any; }; } +>f : { (p: string): { [p: string]: string;}; (p: "spec"): { [p: number]: any; }; } >p : string >p : string f(p: "spec"): { [p: number]: any; } // Should be error ->f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: number]: any; }; } +>f : { (p: string): { [p: string]: string; }; (p: "spec"): { [p: number]: any;}; } >p : "spec" >p : number } diff --git a/tests/baselines/reference/strictModeReservedWord.types b/tests/baselines/reference/strictModeReservedWord.types index 1529e440356df..4fe5a085cf828 100644 --- a/tests/baselines/reference/strictModeReservedWord.types +++ b/tests/baselines/reference/strictModeReservedWord.types @@ -40,7 +40,7 @@ function foo() { >baz : () => void function barn(cb: (private, public, package) => void) { } ->barn : (cb: (private: any, public: any, package: any) => void) => void +>barn : (cb: (private, public, package) => void) => void >cb : (private: any, public: any, package: any) => void >private : any >public : any diff --git a/tests/baselines/reference/strictOptionalProperties1.types b/tests/baselines/reference/strictOptionalProperties1.types index 6dfefa5876bf7..aa439d7d64a25 100644 --- a/tests/baselines/reference/strictOptionalProperties1.types +++ b/tests/baselines/reference/strictOptionalProperties1.types @@ -2,7 +2,7 @@ === strictOptionalProperties1.ts === function f1(obj: { a?: string, b?: string | undefined }) { ->f1 : (obj: { a?: string; b?: string | undefined; }) => void +>f1 : (obj: { a?: string; b?: string | undefined;}) => void >obj : { a?: string; b?: string | undefined; } >a : string | undefined >b : string | undefined @@ -220,7 +220,7 @@ function f2(obj: { a?: string, b?: string | undefined }) { } function f3(obj: Partial<{ a: string, b: string | undefined }>) { ->f3 : (obj: Partial<{ a: string; b: string | undefined; }>) => void +>f3 : (obj: Partial<{ a: string; b: string | undefined;}>) => void >obj : Partial<{ a: string; b: string | undefined; }> >a : string >b : string | undefined diff --git a/tests/baselines/reference/strictSubtypeAndNarrowing.types b/tests/baselines/reference/strictSubtypeAndNarrowing.types index 3892eefe407d1..a1f440b17a109 100644 --- a/tests/baselines/reference/strictSubtypeAndNarrowing.types +++ b/tests/baselines/reference/strictSubtypeAndNarrowing.types @@ -336,7 +336,7 @@ declare function isArrayLike(value: any): value is { length: number }; >length : number function ff1(value: { [index: number]: boolean, length: number } | undefined) { ->ff1 : (value: { [index: number]: boolean; length: number; } | undefined) => void +>ff1 : (value: { [index: number]: boolean; length: number;} | undefined) => void >value : { [index: number]: boolean; length: number; } | undefined >index : number >length : number @@ -358,7 +358,7 @@ function ff1(value: { [index: number]: boolean, length: number } | undefined) { } function ff2(value: { [index: number]: boolean, length: number } | string) { ->ff2 : (value: string | { [index: number]: boolean; length: number; }) => void +>ff2 : (value: { [index: number]: boolean; length: number;} | string) => void >value : string | { [index: number]: boolean; length: number; } >index : number >length : number @@ -380,7 +380,7 @@ function ff2(value: { [index: number]: boolean, length: number } | string) { } function ff3(value: string | string[] | { [index: number]: boolean, length: number } | [number, boolean] | number | { length: string } | { a: string } | null | undefined) { ->ff3 : (value: string | number | { [index: number]: boolean; length: number; } | [number, boolean] | { length: string; } | { a: string; } | string[] | null | undefined) => void +>ff3 : (value: string | string[] | { [index: number]: boolean; length: number;} | [number, boolean] | number | { length: string;} | { a: string;} | null | undefined) => void >value : string | number | { [index: number]: boolean; length: number; } | [number, boolean] | { length: string; } | { a: string; } | string[] | null | undefined >index : number >length : number diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.types b/tests/baselines/reference/subtypingWithCallSignatures2.types index 56aacd670482e..0c16bdef45100 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.types +++ b/tests/baselines/reference/subtypingWithCallSignatures2.types @@ -184,7 +184,7 @@ declare function foo14(a: any): any; >a : any declare function foo15(a: { ->foo15 : { (a: { (x: number): number[]; (x: string): string[]; }): typeof a; (a: any): any; } +>foo15 : { (a: { (x: number): number[]; (x: string): string[];}): typeof a; (a: any): any; } >a : { (x: number): number[]; (x: string): string[]; } (x: number): number[]; @@ -218,7 +218,7 @@ declare function foo16(a: any): any; >a : any declare function foo17(a: { ->foo17 : { (a: { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }): typeof a; (a: any): any; } +>foo17 : { (a: { (x: (a: number) => number): number[]; (x: (a: string) => string): string[];}): typeof a; (a: any): any; } >a : { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; } (x: (a: number) => number): number[]; @@ -237,8 +237,8 @@ declare function foo17(a: any): any; >a : any declare function foo18(a: { ->foo18 : { (a: { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }): typeof a; (a: any): any; } ->a : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; } +>foo18 : { (a: { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[];}): typeof a; (a: any): any; } +>a : { (x: { (a: number): number; (a: string): string;}): any[]; (x: { (a: boolean): boolean; (a: Date): Date;}): any[]; } (x: { >x : { (a: number): number; (a: string): string; } diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.types b/tests/baselines/reference/subtypingWithCallSignatures3.types index 38349bb1ece68..d878133bde703 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.types +++ b/tests/baselines/reference/subtypingWithCallSignatures3.types @@ -110,8 +110,8 @@ module Errors { >a2 : any declare function foo16(a2: { ->foo16 : { (a2: { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }): { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }; (a2: any): any; } ->a2 : { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; } +>foo16 : { (a2: { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[];}): { (x: { (a: number): number; (a?: number): number;}): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean;}): boolean[]; }; (a2: any): any; } +>a2 : { (x: { (a: number): number; (a?: number): number;}): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean;}): boolean[]; } // type of parameter is overload set which means we can't do inference based on this type (x: { diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.types b/tests/baselines/reference/subtypingWithConstructSignatures2.types index 2b4f592cd3f38..84bd8c69e54f9 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.types @@ -184,7 +184,7 @@ declare function foo14(a: any): any; >a : any declare function foo15(a: { ->foo15 : { (a: { new (x: number): number[]; new (x: string): string[]; }): typeof a; (a: any): any; } +>foo15 : { (a: { new (x: number): number[]; new (x: string): string[];}): typeof a; (a: any): any; } >a : { new (x: number): number[]; new (x: string): string[]; } new (x: number): number[]; @@ -218,7 +218,7 @@ declare function foo16(a: any): any; >a : any declare function foo17(a: { ->foo17 : { (a: { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[]; }): typeof a; (a: any): any; } +>foo17 : { (a: { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[];}): typeof a; (a: any): any; } >a : { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[]; } new (x: (a: number) => number): number[]; @@ -237,8 +237,8 @@ declare function foo17(a: any): any; >a : any declare function foo18(a: { ->foo18 : { (a: { new (x: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; }): typeof a; (a: any): any; } ->a : { new (x: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; } +>foo18 : { (a: { new (x: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[];}): typeof a; (a: any): any; } +>a : { new (x: { new (a: number): number; new (a: string): string;}): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date;}): any[]; } new (x: { >x : { new (a: number): number; new (a: string): string; } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.types b/tests/baselines/reference/subtypingWithConstructSignatures3.types index 7e2e81ca46cc7..38983724c5cc2 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.types @@ -110,8 +110,8 @@ module Errors { >a2 : any declare function foo16(a2: { ->foo16 : { (a2: { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }): { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }; (a2: any): any; } ->a2 : { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; } +>foo16 : { (a2: { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[];}): { new (x: { new (a: number): number; new (a?: number): number;}): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean;}): boolean[]; }; (a2: any): any; } +>a2 : { new (x: { new (a: number): number; new (a?: number): number;}): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean;}): boolean[]; } // type of parameter is overload set which means we can't do inference based on this type new (x: { diff --git a/tests/baselines/reference/symbolProperty61.types b/tests/baselines/reference/symbolProperty61.types index 7e6482c2a095c..29b7ef6835236 100644 --- a/tests/baselines/reference/symbolProperty61.types +++ b/tests/baselines/reference/symbolProperty61.types @@ -51,7 +51,7 @@ type InteropObservable = { >InteropObservable : InteropObservable [Symbol.obs]: () => { subscribe(next: (val: T) => void): void } ->[Symbol.obs] : () => { subscribe(next: (val: T) => void): void; } +>[Symbol.obs] : () => { subscribe(next: (val: T) => void): void;} >Symbol.obs : unique symbol >Symbol : SymbolConstructor >obs : unique symbol diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types index 7fda78de0ffae..c0c2ab9e1073c 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressions.types @@ -7,7 +7,7 @@ interface I { >subs : number[] member: { ->member : new (s: string) => new (n: number) => { new (): boolean;} +>member : new (s: string) => { new (n: number): { new (): boolean; };} new (s: string): { >s : string diff --git a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types index 7ca5153a048c7..85715c5dfc845 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types +++ b/tests/baselines/reference/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.types @@ -7,7 +7,7 @@ interface I { >subs : number[] member: { ->member : new (s: string) => new (n: number) => { new (): boolean;} +>member : new (s: string) => { new (n: number): { new (): boolean; };} new (s: string): { >s : string diff --git a/tests/baselines/reference/taggedTemplatesWithTypeArguments1.types b/tests/baselines/reference/taggedTemplatesWithTypeArguments1.types index 3d9a23e9aaa8e..3ac9fba42eb3d 100644 --- a/tests/baselines/reference/taggedTemplatesWithTypeArguments1.types +++ b/tests/baselines/reference/taggedTemplatesWithTypeArguments1.types @@ -2,7 +2,7 @@ === taggedTemplatesWithTypeArguments1.ts === declare function f(strs: TemplateStringsArray, ...callbacks: Array<(x: T) => any>): void; ->f : (strs: TemplateStringsArray, ...callbacks: ((x: T) => any)[]) => void +>f : (strs: TemplateStringsArray, ...callbacks: Array<(x: T) => any>) => void >strs : TemplateStringsArray >callbacks : ((x: T) => any)[] >x : T diff --git a/tests/baselines/reference/tslibReExportHelpers2.types b/tests/baselines/reference/tslibReExportHelpers2.types index 1c0b27ec23bd0..4ca51dbbcd372 100644 --- a/tests/baselines/reference/tslibReExportHelpers2.types +++ b/tests/baselines/reference/tslibReExportHelpers2.types @@ -2,7 +2,7 @@ === /node_modules/tslib/index.d.ts === export declare function __classPrivateFieldGet( ->__classPrivateFieldGet : { (receiver: T, state: { has(o: T): boolean; get(o: T): V | undefined; }, kind?: "f"): V; unknown, V_1>(receiver: T_1, state: T_1, kind: "f", f: { value: V_1; }): V_1; } +>__classPrivateFieldGet : { (receiver: T, state: { has(o: T): boolean; get(o: T): V | undefined;}, kind?: "f"): V; unknown, V_1>(receiver: T_1, state: T_1, kind: "f", f: { value: V_1; }): V_1; } receiver: T, >receiver : T diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.types b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.types index 54739ce5187d5..ed790c1f91c21 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.types @@ -38,7 +38,7 @@ function Baz(key1: T, value: U) { } declare function Link(l: {func: (arg: U)=>void}): JSX.Element; ->Link : (l: { func: (arg: U) => void; }) => JSX.Element +>Link : (l: { func: (arg: U) => void;}) => JSX.Element >l : { func: (arg: U) => void; } >func : (arg: U) => void >arg : U diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.types b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.types index aae77bbb45b6d..1cbca0da3ab32 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.types @@ -45,7 +45,7 @@ function Baz(arg: T) { } declare function Link(l: {func: (arg: U)=>void}): JSX.Element; ->Link : (l: { func: (arg: U) => void; }) => JSX.Element +>Link : (l: { func: (arg: U) => void;}) => JSX.Element >l : { func: (arg: U) => void; } >func : (arg: U) => void >arg : U diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.types b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.types index 98db4b9d6b071..642080fe05e0a 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.types @@ -83,14 +83,14 @@ function Baz(arg1: T, a } declare function Link(l: {func: (arg: U)=>void}): JSX.Element; ->Link : { (l: { func: (arg: U) => void; }): JSX.Element; (l: { func: (arg1: U_1, arg2: string) => void; }): JSX.Element; } +>Link : { (l: { func: (arg: U) => void;}): JSX.Element; (l: { func: (arg1: U_1, arg2: string) => void; }): JSX.Element; } >l : { func: (arg: U) => void; } >func : (arg: U) => void >arg : U >JSX : any declare function Link(l: {func: (arg1:U, arg2: string)=>void}): JSX.Element; ->Link : { (l: { func: (arg: U_1) => void; }): JSX.Element; (l: { func: (arg1: U, arg2: string) => void; }): JSX.Element; } +>Link : { (l: { func: (arg: U_1) => void; }): JSX.Element; (l: { func: (arg1: U, arg2: string) => void;}): JSX.Element; } >l : { func: (arg1: U, arg2: string) => void; } >func : (arg1: U, arg2: string) => void >arg1 : U diff --git a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.types b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.types index 29c99795bbcf8..29d365030c44b 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.types +++ b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.types @@ -68,7 +68,7 @@ enum E2 { X } // Check that we infer from both a.r and b before fixing T in a.w declare function f1(a: { w: (x: T) => U; r: () => T; }, b: T): U; ->f1 : (a: { w: (x: T) => U; r: () => T; }, b: T) => U +>f1 : (a: { w: (x: T) => U; r: () => T;}, b: T) => U >a : { w: (x: T) => U; r: () => T; } >w : (x: T) => U >x : T diff --git a/tests/baselines/reference/typeGuardFunction.types b/tests/baselines/reference/typeGuardFunction.types index 6a1ccbc3c8d40..9bb7015bcde47 100644 --- a/tests/baselines/reference/typeGuardFunction.types +++ b/tests/baselines/reference/typeGuardFunction.types @@ -170,7 +170,7 @@ acceptingBoolean(isA(a)); // Type predicates with different parameter name. declare function acceptingTypeGuardFunction(p1: (item) => item is A); ->acceptingTypeGuardFunction : (p1: (item: any) => item is A) => any +>acceptingTypeGuardFunction : (p1: (item) => item is A) => any >p1 : (item: any) => item is A >item : any diff --git a/tests/baselines/reference/typeGuardFunctionErrors.types b/tests/baselines/reference/typeGuardFunctionErrors.types index 24be6f7c2f6c8..fdd45f1ec3250 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.types +++ b/tests/baselines/reference/typeGuardFunctionErrors.types @@ -157,7 +157,7 @@ if (hasNoTypeGuard(a)) { // Type predicate type is not assignable declare function acceptingDifferentSignatureTypeGuardFunction(p1: (p1) => p1 is B); ->acceptingDifferentSignatureTypeGuardFunction : (p1: (p1: any) => p1 is B) => any +>acceptingDifferentSignatureTypeGuardFunction : (p1: (p1) => p1 is B) => any >p1 : (p1: any) => p1 is B >p1 : any diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.types b/tests/baselines/reference/typeGuardFunctionGenerics.types index 75d1ab867f5c8..97de353aba8bd 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.types +++ b/tests/baselines/reference/typeGuardFunctionGenerics.types @@ -36,29 +36,29 @@ declare function retC(x): C; >x : any declare function funA(p1: (p1) => T): T; ->funA : (p1: (p1: any) => T) => T +>funA : (p1: (p1) => T) => T >p1 : (p1: any) => T >p1 : any declare function funB(p1: (p1) => T, p2: any): p2 is T; ->funB : (p1: (p1: any) => T, p2: any) => p2 is T +>funB : (p1: (p1) => T, p2: any) => p2 is T >p1 : (p1: any) => T >p1 : any >p2 : any declare function funC(p1: (p1) => p1 is T): T; ->funC : (p1: (p1: any) => p1 is T) => T +>funC : (p1: (p1) => p1 is T) => T >p1 : (p1: any) => p1 is T >p1 : any declare function funD(p1: (p1) => p1 is T, p2: any): p2 is T; ->funD : (p1: (p1: any) => p1 is T, p2: any) => p2 is T +>funD : (p1: (p1) => p1 is T, p2: any) => p2 is T >p1 : (p1: any) => p1 is T >p1 : any >p2 : any declare function funE(p1: (p1) => p1 is T, p2: U): T; ->funE : (p1: (p1: any) => p1 is T, p2: U) => T +>funE : (p1: (p1) => p1 is T, p2: U) => T >p1 : (p1: any) => p1 is T >p1 : any >p2 : U diff --git a/tests/baselines/reference/typeLiteralCallback.types b/tests/baselines/reference/typeLiteralCallback.types index 96ec8f2ee1769..c9a6ca48a5cd9 100644 --- a/tests/baselines/reference/typeLiteralCallback.types +++ b/tests/baselines/reference/typeLiteralCallback.types @@ -16,7 +16,7 @@ interface bar { >arg : T fail2(func: { (arg: T): void ; }): void ; ->fail2 : (func: (arg: T) => void) => void +>fail2 : (func: { (arg: T): void;}) => void >func : (arg: T) => void >arg : T } diff --git a/tests/baselines/reference/typeMatch1.types b/tests/baselines/reference/typeMatch1.types index a899fa691582b..95f2d2f923dda 100644 --- a/tests/baselines/reference/typeMatch1.types +++ b/tests/baselines/reference/typeMatch1.types @@ -16,7 +16,7 @@ var x1: { z: number; f(n: number): string; f(s: string): number; } >s : string var x2: { z:number;f:{(n:number):string;(s:string):number;}; } = x1; ->x2 : { z: number; f: { (n: number): string; (s: string): number; }; } +>x2 : { z: number; f: { (n: number): string; (s: string): number;}; } >z : number >f : { (n: number): string; (s: string): number; } >n : number diff --git a/tests/baselines/reference/typeName1.types b/tests/baselines/reference/typeName1.types index 9f4686cd59072..4c81c52491fcf 100644 --- a/tests/baselines/reference/typeName1.types +++ b/tests/baselines/reference/typeName1.types @@ -60,7 +60,7 @@ var x5:{ (s:string):number;(n:number):string;x;y;z:number;f(n:number):string;f(s >3 : 3 var x6:{ z:number;f:{(n:number):string;(s:string):number;}; }=3; ->x6 : { z: number; f: { (n: number): string; (s: string): number; }; } +>x6 : { z: number; f: { (n: number): string; (s: string): number;}; } >z : number >f : { (n: number): string; (s: string): number; } >n : number @@ -98,7 +98,7 @@ var x11:{z:I;x:boolean;}[][]=3; >3 : 3 var x12:{z:I;x:boolean;y:(s:string)=>boolean;w:{ z:I;[s:string]:{ x; y; };[n:number]:{x; y;};():boolean; };}[][]=3; ->x12 : { z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }; }[][] +>x12 : { z: I; x: boolean; y: (s: string) => boolean; w: { z: I; [s: string]: { x; y; }; [n: number]: { x; y; }; (): boolean;}; }[][] >z : I >x : boolean >y : (s: string) => boolean diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence5.types b/tests/baselines/reference/typeParameterArgumentEquivalence5.types index c2e515de64206..586990bfc2b9e 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence5.types +++ b/tests/baselines/reference/typeParameterArgumentEquivalence5.types @@ -5,11 +5,11 @@ function foo() { >foo : () => void var x: () => (item) => U; ->x : () => (item: any) => U +>x : () => (item) => U >item : any var y: () => (item) => T; ->y : () => (item: any) => T +>y : () => (item) => T >item : any x = y; // Should be an error diff --git a/tests/baselines/reference/typeVariableConstraintIntersections.types b/tests/baselines/reference/typeVariableConstraintIntersections.types index 6d89a64f8a0b8..1717c85c3048b 100644 --- a/tests/baselines/reference/typeVariableConstraintIntersections.types +++ b/tests/baselines/reference/typeVariableConstraintIntersections.types @@ -233,7 +233,7 @@ const optionHandlers: OptionHandlers = { }; function handleOption(option: Options & { kind: K }): string { ->handleOption : (option: Options & { kind: K; }) => string +>handleOption : (option: Options & { kind: K;}) => string >option : Options & { kind: K; } >kind : K diff --git a/tests/baselines/reference/types.asyncGenerators.es2018.1.types b/tests/baselines/reference/types.asyncGenerators.es2018.1.types index 1dab8448cf487..ad815ffa21462 100644 --- a/tests/baselines/reference/types.asyncGenerators.es2018.1.types +++ b/tests/baselines/reference/types.asyncGenerators.es2018.1.types @@ -433,7 +433,7 @@ async function * awaitedType2() { >1 : 1 } async function * nextType1(): { next(...args: [] | [number | PromiseLike]): any } { ->nextType1 : () => { next(...args: [] | [number | PromiseLike]): any; } +>nextType1 : () => { next(...args: [] | [number | PromiseLike]): any;} >next : (...args: [] | [number | PromiseLike]) => any >args : [] | [number | PromiseLike] diff --git a/tests/baselines/reference/unicodeEscapesInJsxtags.types b/tests/baselines/reference/unicodeEscapesInJsxtags.types index e8439dc05b388..2a835986a6f9f 100644 --- a/tests/baselines/reference/unicodeEscapesInJsxtags.types +++ b/tests/baselines/reference/unicodeEscapesInJsxtags.types @@ -18,8 +18,8 @@ declare global { } } const Compa = (x: {x: number}) =>
{"" + x}
; ->Compa : (x: { x: number; }) => JSX.Element ->(x: {x: number}) =>
{"" + x}
: (x: { x: number; }) => JSX.Element +>Compa : (x: { x: number;}) => JSX.Element +>(x: {x: number}) =>
{"" + x}
: (x: { x: number;}) => JSX.Element >x : { x: number; } >x : number >
{"" + x}
: JSX.Element diff --git a/tests/baselines/reference/unionReductionMutualSubtypes.types b/tests/baselines/reference/unionReductionMutualSubtypes.types index 2307384f878a1..dba96258452ae 100644 --- a/tests/baselines/reference/unionReductionMutualSubtypes.types +++ b/tests/baselines/reference/unionReductionMutualSubtypes.types @@ -17,7 +17,7 @@ declare const val: ReturnVal; >val : ReturnVal function run(options: { something?(b?: string): void }) { ->run : (options: { something?(b?: string): void; }) => void +>run : (options: { something?(b?: string): void;}) => void >options : { something?(b?: string): void; } >something : ((b?: string) => void) | undefined >b : string | undefined diff --git a/tests/baselines/reference/unionSignaturesWithThisParameter.types b/tests/baselines/reference/unionSignaturesWithThisParameter.types index da59997272e51..0debb675309a8 100644 --- a/tests/baselines/reference/unionSignaturesWithThisParameter.types +++ b/tests/baselines/reference/unionSignaturesWithThisParameter.types @@ -4,7 +4,7 @@ // Repro from #20802 function x(ctor: { ->x : (ctor: { (this: {}, v: T): void; new (v: T): void; } | { (v: T): void; new (v: T): void; }, t: T) => void +>x : (ctor: { (this: {}, v: T): void; new (v: T): void;} | { (v: T): void; new (v: T): void;}, t: T) => void >ctor : { (this: {}, v: T): void; new (v: T): void; } | { (v: T): void; new (v: T): void; } (this: {}, v: T): void; diff --git a/tests/baselines/reference/unionTypeReduction2.types b/tests/baselines/reference/unionTypeReduction2.types index 269b8f5ca6faa..cbd4e779044c9 100644 --- a/tests/baselines/reference/unionTypeReduction2.types +++ b/tests/baselines/reference/unionTypeReduction2.types @@ -2,7 +2,7 @@ === unionTypeReduction2.ts === function f1(x: { f(): void }, y: { f(x?: string): void }) { ->f1 : (x: { f(): void;}, y: { f(x?: string): void; }) => void +>f1 : (x: { f(): void;}, y: { f(x?: string): void;}) => void >x : { f(): void; } >f : () => void >y : { f(x?: string): void; } @@ -33,7 +33,7 @@ function f1(x: { f(): void }, y: { f(x?: string): void }) { } function f2(x: { f(x: string | undefined): void }, y: { f(x?: string): void }) { ->f2 : (x: { f(x: string | undefined): void; }, y: { f(x?: string): void; }) => void +>f2 : (x: { f(x: string | undefined): void;}, y: { f(x?: string): void;}) => void >x : { f(x: string | undefined): void; } >f : (x: string | undefined) => void >x : string | undefined @@ -229,7 +229,7 @@ declare const val: ReturnVal; >val : ReturnVal function run(options: { something?(b?: string): void }) { ->run : (options: { something?(b?: string): void; }) => void +>run : (options: { something?(b?: string): void;}) => void >options : { something?(b?: string): void; } >something : ((b?: string) => void) | undefined >b : string | undefined diff --git a/tests/baselines/reference/uniqueSymbols.types b/tests/baselines/reference/uniqueSymbols.types index 2733ed076ca87..10f462af87b6a 100644 --- a/tests/baselines/reference/uniqueSymbols.types +++ b/tests/baselines/reference/uniqueSymbols.types @@ -912,7 +912,7 @@ const ce0 = class { }; function funcInferredReturnType(obj: { method(p: typeof s): void }) { ->funcInferredReturnType : (obj: { method(p: typeof s): void; }) => { method(p: typeof s): void; } +>funcInferredReturnType : (obj: { method(p: typeof s): void;}) => { method(p: typeof s): void; } >obj : { method(p: typeof s): void; } >method : (p: typeof s) => void >p : unique symbol diff --git a/tests/baselines/reference/uniqueSymbolsDeclarationsErrors.types b/tests/baselines/reference/uniqueSymbolsDeclarationsErrors.types index 90d461473f4cc..defd18906b902 100644 --- a/tests/baselines/reference/uniqueSymbolsDeclarationsErrors.types +++ b/tests/baselines/reference/uniqueSymbolsDeclarationsErrors.types @@ -55,7 +55,7 @@ export const classExpression = class { }; export function funcInferredReturnType(obj: { method(p: typeof s): void }) { ->funcInferredReturnType : (obj: { method(p: typeof s): void; }) => { method(p: typeof s): void; } +>funcInferredReturnType : (obj: { method(p: typeof s): void;}) => { method(p: typeof s): void; } >obj : { method(p: typeof s): void; } >method : (p: typeof s) => void >p : unique symbol diff --git a/tests/baselines/reference/unknownType1.types b/tests/baselines/reference/unknownType1.types index b929a29d5fdd6..e3b30a8316194 100644 --- a/tests/baselines/reference/unknownType1.types +++ b/tests/baselines/reference/unknownType1.types @@ -342,7 +342,7 @@ function f23(x: T) { // Anything fresh but primitive assignable to { [x: string]: unknown } function f24(x: { [x: string]: unknown }) { ->f24 : (x: { [x: string]: unknown; }) => void +>f24 : (x: { [x: string]: unknown;}) => void >x : { [x: string]: unknown; } >x : string diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.types b/tests/baselines/reference/varArgsOnConstructorTypes.types index a23c91dab25cc..71e463d404bd7 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.types +++ b/tests/baselines/reference/varArgsOnConstructorTypes.types @@ -50,7 +50,7 @@ export interface I1 { >params : any[] register(inputClass: { new (...params: any[]): A; }[]); ->register : { (inputClass: new (...params: any[]) => A): any; (inputClass: (new (...params: any[]) => A)[]): any; } +>register : { (inputClass: new (...params: any[]) => A): any; (inputClass: { new (...params: any[]): A;}[]): any; } >inputClass : (new (...params: any[]) => A)[] >params : any[] } diff --git a/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.types b/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.types index fcb1942c1b5f7..a97d88e44e0b1 100644 --- a/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.types +++ b/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.types @@ -39,7 +39,7 @@ module WinJS { >value : any static join(promises: { [name: string]: Promise; }): Promise; ->join : { (promises: { [name: string]: Promise; }): Promise; (promises: Promise[]): Promise; } +>join : { (promises: { [name: string]: Promise;}): Promise; (promises: Promise[]): Promise; } >promises : { [name: string]: Promise; } >name : string diff --git a/tests/baselines/reference/voidReturnLambdaValue.types b/tests/baselines/reference/voidReturnLambdaValue.types index 0efe3d9aa7647..bda1e53232349 100644 --- a/tests/baselines/reference/voidReturnLambdaValue.types +++ b/tests/baselines/reference/voidReturnLambdaValue.types @@ -2,7 +2,7 @@ === voidReturnLambdaValue.ts === function foo(arg1, arg2, callback:(v1,v2,v3) => void):void { ->foo : (arg1: any, arg2: any, callback: (v1: any, v2: any, v3: any) => void) => void +>foo : (arg1: any, arg2: any, callback: (v1, v2, v3) => void) => void >arg1 : any >arg2 : any >callback : (v1: any, v2: any, v3: any) => void diff --git a/tests/cases/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.ts b/tests/cases/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.ts new file mode 100644 index 0000000000000..6ba10cbc49032 --- /dev/null +++ b/tests/cases/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.ts @@ -0,0 +1,10 @@ +// @strict: true +// @declaration: true +// @filename: node_modules/whatever/index.d.ts +export type Whatever = {x: T}; +export declare function something(cb: () => Whatever): Whatever; + +// @filename: index.ts +import * as E from 'whatever'; + +export const run = (i: () => E.Whatever): E.Whatever => E.something(i); \ No newline at end of file diff --git a/tests/cases/fourslash/objectLiteralCallSignatures.ts b/tests/cases/fourslash/objectLiteralCallSignatures.ts index 3c6d30ae7e458..3749d26fb4e62 100644 --- a/tests/cases/fourslash/objectLiteralCallSignatures.ts +++ b/tests/cases/fourslash/objectLiteralCallSignatures.ts @@ -22,6 +22,6 @@ verify.not.errorExistsAfterMarker('1'); verify.quickInfos({ - 1: "var x: {\n func1(x: number): number;\n func2: (x: number) => number;\n func3: (x: number) => number;\n}", + 1: "var x: {\n func1(x: number): number;\n func2: (x: number) => number;\n func3: {\n (x: number): number;\n };\n}", 2: "var y: {\n func4(x: number): number;\n func4(s: string): string;\n func5: {\n (x: number): number;\n (s: string): string;\n };\n}" });