diff --git a/src/harness/typeWriter.ts b/src/harness/typeWriter.ts index 953e3413a93..a3b23d10f14 100644 --- a/src/harness/typeWriter.ts +++ b/src/harness/typeWriter.ts @@ -86,7 +86,7 @@ class TypeWriterWalker { column: lineAndCharacter.character, syntaxKind: ts.SyntaxKind[node.kind], sourceText: sourceText, - type: this.checker.typeToString(type, node.parent, ts.TypeFormatFlags.UseTypeOfFunction) + type: this.checker.typeToString(type, node.parent, ts.TypeFormatFlags.None) }); } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types index 51bd20fea92..3ea1919ecae 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types @@ -18,7 +18,7 @@ module Point { >Point : typeof Point function Origin() { return ""; }// not an error, since not exported ->Origin : typeof Origin +>Origin : () => string } @@ -44,6 +44,6 @@ module A { >Point : typeof Point function Origin() { return ""; }// not an error since not exported ->Origin : typeof Origin +>Origin : () => string } } diff --git a/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.types b/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.types index fe2fea1b7a6..ac1845a533c 100644 --- a/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.types +++ b/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.types @@ -23,7 +23,7 @@ module A { } export function fromOrigin(p: Point): Line { ->fromOrigin : typeof fromOrigin +>fromOrigin : (p: Point) => Line >p : Point >Point : Point >Line : Line diff --git a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.types b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.types index 36c78cd700a..3f3a670ee8e 100644 --- a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.types +++ b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.types @@ -23,7 +23,7 @@ module A { } export function fromOrigin(p: Point): Line { ->fromOrigin : typeof fromOrigin +>fromOrigin : (p: Point) => Line >p : Point >Point : Point >Line : Line diff --git a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.types b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.types index 5d59aa10039..7634e2cde3e 100644 --- a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.types +++ b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.types @@ -23,7 +23,7 @@ module A { } export function fromOrigin(p: Point): Line { ->fromOrigin : typeof fromOrigin +>fromOrigin : (p: Point) => Line >p : Point >Point : Point >Line : Line diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types index 24174ebad50..879088f93df 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types @@ -3,7 +3,7 @@ module A { >A : typeof A export function Point() { ->Point : typeof Point +>Point : () => { x: number; y: number; } return { x: 0, y: 0 }; >{ x: 0, y: 0 } : { x: number; y: number; } @@ -35,9 +35,9 @@ var fn: () => { x: number; y: number }; var fn = A.Point; >fn : () => { x: number; y: number; } ->A.Point : typeof A.Point +>A.Point : () => { x: number; y: number; } >A : typeof A ->Point : typeof A.Point +>Point : () => { x: number; y: number; } var cl: { x: number; y: number; } >cl : { x: number; y: number; } diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types index 135eeae57b7..003fb5fa15a 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types @@ -16,7 +16,7 @@ module A { >Utils : typeof Utils export function mirror(p: T) { ->mirror : typeof mirror +>mirror : (p: T) => { x: number; y: number; } >T : T >Point : Point >p : T @@ -87,11 +87,11 @@ var o = A.Origin; var o = A.Utils.mirror(o); >o : { x: number; y: number; } >A.Utils.mirror(o) : { x: number; y: number; } ->A.Utils.mirror : typeof A.Utils.mirror +>A.Utils.mirror : (p: T) => { x: number; y: number; } >A.Utils : typeof A.Utils >A : typeof A >Utils : typeof A.Utils ->mirror : typeof A.Utils.mirror +>mirror : (p: T) => { x: number; y: number; } >o : { x: number; y: number; } var p: { tl: A.Point; br: A.Point }; diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types index 59cdbf6f50e..b31bb4b22ac 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types @@ -19,7 +19,7 @@ module Root { >Utils : typeof Utils export function mirror(p: T) { ->mirror : typeof mirror +>mirror : (p: T) => { x: number; y: number; } >T : T >Point : Point >p : T diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types index 4f58b36c5e6..b13cbde5522 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types @@ -16,7 +16,7 @@ module A { >Utils : typeof Utils export function mirror(p: T) { ->mirror : typeof mirror +>mirror : (p: T) => { x: number; y: number; } >T : T >Point : Point >p : T @@ -84,11 +84,11 @@ var o = A.Origin; var o = A.Utils.mirror(o); >o : { x: number; y: number; } >A.Utils.mirror(o) : { x: number; y: number; } ->A.Utils.mirror : typeof A.Utils.mirror +>A.Utils.mirror : (p: T) => { x: number; y: number; } >A.Utils : typeof A.Utils >A : typeof A >Utils : typeof A.Utils ->mirror : typeof A.Utils.mirror +>mirror : (p: T) => { x: number; y: number; } >o : { x: number; y: number; } var p: { tl: A.Point; br: A.Point }; diff --git a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.types b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.types index f3fa9fad181..da534c68ad6 100644 --- a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.types +++ b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.types @@ -1,6 +1,6 @@ === tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithAnyAndEveryType.ts === function foo() { } ->foo : typeof foo +>foo : () => void class C { >C : C @@ -98,14 +98,14 @@ var r10 = a + foo; >r10 : any >a + foo : any >a : any ->foo : typeof foo +>foo : () => void var r11 = a + foo(); >r11 : any >a + foo() : any >a : any >foo() : void ->foo : typeof foo +>foo : () => void var r12 = a + C; >r12 : any diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.types b/tests/baselines/reference/aliasUsageInGenericFunction.types index d3d0814ed66..cf63eba6a61 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.types +++ b/tests/baselines/reference/aliasUsageInGenericFunction.types @@ -14,7 +14,7 @@ interface IHasVisualizationModel { >Model : typeof Backbone.Model } function foo(x: T) { ->foo : typeof foo +>foo : (x: T) => T >T : T >a : IHasVisualizationModel >IHasVisualizationModel : IHasVisualizationModel @@ -27,7 +27,7 @@ function foo(x: T) { var r = foo({ a: moduleA }); >r : { a: typeof moduleA; } >foo({ a: moduleA }) : { a: typeof moduleA; } ->foo : typeof foo +>foo : (x: T) => T >{ a: moduleA } : { a: typeof moduleA; } >a : typeof moduleA >moduleA : typeof moduleA @@ -35,7 +35,7 @@ var r = foo({ a: moduleA }); var r2 = foo({ a: null }); >r2 : { a: IHasVisualizationModel; } >foo({ a: null }) : { a: IHasVisualizationModel; } ->foo : typeof foo +>foo : (x: T) => T >{ a: null } : { a: IHasVisualizationModel; } >a : IHasVisualizationModel >null : IHasVisualizationModel diff --git a/tests/baselines/reference/aliasUsedAsNameValue.types b/tests/baselines/reference/aliasUsedAsNameValue.types index 5b687138341..b8d92f28496 100644 --- a/tests/baselines/reference/aliasUsedAsNameValue.types +++ b/tests/baselines/reference/aliasUsedAsNameValue.types @@ -14,9 +14,9 @@ export var a = function () { //var x = mod.id; // TODO needed hack that mod is loaded b.b(mod); >b.b(mod) : any ->b.b : typeof b.b +>b.b : (a: any) => any >b : typeof b ->b : typeof b.b +>b : (a: any) => any >mod : typeof mod } @@ -26,6 +26,6 @@ export var id: number; === tests/cases/compiler/aliasUsedAsNameValue_1.ts === export function b(a: any): any { return null; } ->b : typeof b +>b : (a: any) => any >a : any diff --git a/tests/baselines/reference/ambientDeclarations.types b/tests/baselines/reference/ambientDeclarations.types index 261952c284e..38814405521 100644 --- a/tests/baselines/reference/ambientDeclarations.types +++ b/tests/baselines/reference/ambientDeclarations.types @@ -9,50 +9,50 @@ declare var m: string; // Ambient function with no type annotations declare function fn1(); ->fn1 : typeof fn1 +>fn1 : () => any // Ambient function with type annotations declare function fn2(n: string): number; ->fn2 : typeof fn2 +>fn2 : (n: string) => number >n : string // Ambient function with valid overloads declare function fn3(n: string): number; ->fn3 : typeof fn3 +>fn3 : (n: string) => number >n : string declare function fn4(n: number, y: number): string; ->fn4 : typeof fn4 +>fn4 : (n: number, y: number) => string >n : number >y : number // Ambient function with optional parameters declare function fn5(x, y?); ->fn5 : typeof fn5 +>fn5 : (x: any, y?: any) => any >x : any >y : any declare function fn6(e?); ->fn6 : typeof fn6 +>fn6 : (e?: any) => any >e : any declare function fn7(x, y?, ...z); ->fn7 : typeof fn7 +>fn7 : (x: any, y?: any, ...z: any[]) => any >x : any >y : any >z : any[] declare function fn8(y?, ...z: number[]); ->fn8 : typeof fn8 +>fn8 : (y?: any, ...z: number[]) => any >y : any >z : number[] declare function fn9(...q: {}[]); ->fn9 : typeof fn9 +>fn9 : (...q: {}[]) => any >q : {}[] declare function fn10(...q: T[]); ->fn10 : typeof fn10 +>fn10 : (...q: T[]) => any >T : T >q : T[] >T : T @@ -141,7 +141,7 @@ declare module M1 { >x : any function fn(): number; ->fn : typeof fn +>fn : () => number } // Ambient module members are always exported with or without export keyword @@ -154,9 +154,9 @@ var p = M1.x; var q = M1.fn(); >q : number >M1.fn() : number ->M1.fn : typeof M1.fn +>M1.fn : () => number >M1 : typeof M1 ->fn : typeof M1.fn +>fn : () => number // Ambient external module in the global module // Ambient external module with a string literal name that is a top level external module name diff --git a/tests/baselines/reference/ambientModuleExports.types b/tests/baselines/reference/ambientModuleExports.types index 9bc8fb57ebe..3f096afa838 100644 --- a/tests/baselines/reference/ambientModuleExports.types +++ b/tests/baselines/reference/ambientModuleExports.types @@ -3,7 +3,7 @@ declare module Foo { >Foo : typeof Foo function a():void; ->a : typeof a +>a : () => void var b:number; >b : number @@ -14,9 +14,9 @@ declare module Foo { Foo.a(); >Foo.a() : void ->Foo.a : typeof Foo.a +>Foo.a : () => void >Foo : typeof Foo ->a : typeof Foo.a +>a : () => void Foo.b; >Foo.b : number @@ -34,7 +34,7 @@ declare module Foo2 { >Foo2 : typeof Foo2 export function a(): void; ->a : typeof a +>a : () => void export var b: number; >b : number @@ -45,9 +45,9 @@ declare module Foo2 { Foo2.a(); >Foo2.a() : void ->Foo2.a : typeof Foo2.a +>Foo2.a : () => void >Foo2 : typeof Foo2 ->a : typeof Foo2.a +>a : () => void Foo2.b; >Foo2.b : number diff --git a/tests/baselines/reference/ambiguousOverloadResolution.types b/tests/baselines/reference/ambiguousOverloadResolution.types index 17ce79db6f1..dd42b44d7c3 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.types +++ b/tests/baselines/reference/ambiguousOverloadResolution.types @@ -8,14 +8,14 @@ class B extends A { x: number; } >x : number declare function f(p: A, q: B): number; ->f : typeof f +>f : { (p: A, q: B): number; (p: B, q: A): string; } >p : A >A : A >q : B >B : B declare function f(p: B, q: A): string; ->f : typeof f +>f : { (p: A, q: B): number; (p: B, q: A): string; } >p : B >B : B >q : A @@ -28,7 +28,7 @@ var x: B; var t: number = f(x, x); // Not an error >t : number >f(x, x) : number ->f : typeof f +>f : { (p: A, q: B): number; (p: B, q: A): string; } >x : B >x : B diff --git a/tests/baselines/reference/anyAsReturnTypeForNewOnCall.types b/tests/baselines/reference/anyAsReturnTypeForNewOnCall.types index e95e692c34d..f25cd57831b 100644 --- a/tests/baselines/reference/anyAsReturnTypeForNewOnCall.types +++ b/tests/baselines/reference/anyAsReturnTypeForNewOnCall.types @@ -1,6 +1,6 @@ === tests/cases/compiler/anyAsReturnTypeForNewOnCall.ts === function Point(x, y) { ->Point : typeof Point +>Point : (x: any, y: any) => void >x : any >y : any @@ -23,7 +23,7 @@ function Point(x, y) { var o = new Point(3, 4); >o : any >new Point(3, 4) : any ->Point : typeof Point +>Point : (x: any, y: any) => void var xx = o.x; >xx : any diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.types b/tests/baselines/reference/anyAssignabilityInInheritance.types index 795e4a1f332..f5a4f22ef3f 100644 --- a/tests/baselines/reference/anyAssignabilityInInheritance.types +++ b/tests/baselines/reference/anyAssignabilityInInheritance.types @@ -15,107 +15,107 @@ var a: any; >a : any declare function foo2(x: number): number; ->foo2 : typeof foo2 +>foo2 : { (x: number): number; (x: any): any; } >x : number declare function foo2(x: any): any; ->foo2 : typeof foo2 +>foo2 : { (x: number): number; (x: any): any; } >x : any var r3 = foo2(a); // any, not a subtype of number so it skips that overload, is a subtype of itself so it picks second (if truly ambiguous it would pick first overload) >r3 : any >foo2(a) : any ->foo2 : typeof foo2 +>foo2 : { (x: number): number; (x: any): any; } >a : any declare function foo3(x: string): string; ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >x : string declare function foo3(x: any): any; ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any declare function foo4(x: boolean): boolean; ->foo4 : typeof foo4 +>foo4 : { (x: boolean): boolean; (x: any): any; } >x : boolean declare function foo4(x: any): any; ->foo4 : typeof foo4 +>foo4 : { (x: boolean): boolean; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any declare function foo5(x: Date): Date; ->foo5 : typeof foo5 +>foo5 : { (x: Date): Date; (x: any): any; } >x : Date >Date : Date >Date : Date declare function foo5(x: any): any; ->foo5 : typeof foo5 +>foo5 : { (x: Date): Date; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any declare function foo6(x: RegExp): RegExp; ->foo6 : typeof foo6 +>foo6 : { (x: RegExp): RegExp; (x: any): any; } >x : RegExp >RegExp : RegExp >RegExp : RegExp declare function foo6(x: any): any; ->foo6 : typeof foo6 +>foo6 : { (x: RegExp): RegExp; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any declare function foo7(x: { bar: number }): { bar: number }; ->foo7 : typeof foo7 +>foo7 : { (x: { bar: number; }): { bar: number; }; (x: any): any; } >x : { bar: number; } >bar : number >bar : number declare function foo7(x: any): any; ->foo7 : typeof foo7 +>foo7 : { (x: { bar: number; }): { bar: number; }; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any declare function foo8(x: number[]): number[]; ->foo8 : typeof foo8 +>foo8 : { (x: number[]): number[]; (x: any): any; } >x : number[] declare function foo8(x: any): any; ->foo8 : typeof foo8 +>foo8 : { (x: number[]): number[]; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any interface I8 { foo: string } @@ -123,19 +123,19 @@ interface I8 { foo: string } >foo : string declare function foo9(x: I8): I8; ->foo9 : typeof foo9 +>foo9 : { (x: I8): I8; (x: any): any; } >x : I8 >I8 : I8 >I8 : I8 declare function foo9(x: any): any; ->foo9 : typeof foo9 +>foo9 : { (x: I8): I8; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any class A { foo: number; } @@ -143,19 +143,19 @@ class A { foo: number; } >foo : number declare function foo10(x: A): A; ->foo10 : typeof foo10 +>foo10 : { (x: A): A; (x: any): any; } >x : A >A : A >A : A declare function foo10(x: any): any; ->foo10 : typeof foo10 +>foo10 : { (x: A): A; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any class A2 { foo: T; } @@ -165,39 +165,39 @@ class A2 { foo: T; } >T : T declare function foo11(x: A2): A2; ->foo11 : typeof foo11 +>foo11 : { (x: A2): A2; (x: any): any; } >x : A2 >A2 : A2 >A2 : A2 declare function foo11(x: any): any; ->foo11 : typeof foo11 +>foo11 : { (x: A2): A2; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any declare function foo12(x: (x) => number): (x) => number; ->foo12 : typeof foo12 +>foo12 : { (x: (x: any) => number): (x: any) => number; (x: any): any; } >x : (x: any) => number >x : any >x : any declare function foo12(x: any): any; ->foo12 : typeof foo12 +>foo12 : { (x: (x: any) => number): (x: any) => number; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any declare function foo13(x: (x: T) => T): (x: T) => T; ->foo13 : typeof foo13 +>foo13 : { (x: (x: T) => T): (x: T) => T; (x: any): any; } >x : (x: T) => T >T : T >x : T @@ -209,13 +209,13 @@ declare function foo13(x: (x: T) => T): (x: T) => T; >T : T declare function foo13(x: any): any; ->foo13 : typeof foo13 +>foo13 : { (x: (x: T) => T): (x: T) => T; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any enum E { A } @@ -223,19 +223,19 @@ enum E { A } >A : E declare function foo14(x: E): E; ->foo14 : typeof foo14 +>foo14 : { (x: E): E; (x: any): any; } >x : E >E : E >E : E declare function foo14(x: any): any; ->foo14 : typeof foo14 +>foo14 : { (x: E): E; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any function f() { } @@ -248,19 +248,19 @@ module f { >bar : number } declare function foo15(x: typeof f): typeof f; ->foo15 : typeof foo15 +>foo15 : { (x: typeof f): typeof f; (x: any): any; } >x : typeof f >f : typeof f >f : typeof f declare function foo15(x: any): any; ->foo15 : typeof foo15 +>foo15 : { (x: typeof f): typeof f; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any class CC { baz: string } @@ -274,48 +274,48 @@ module CC { >bar : number } declare function foo16(x: CC): CC; ->foo16 : typeof foo16 +>foo16 : { (x: CC): CC; (x: any): any; } >x : CC >CC : CC >CC : CC declare function foo16(x: any): any; ->foo16 : typeof foo16 +>foo16 : { (x: CC): CC; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any declare function foo17(x: Object): Object; ->foo17 : typeof foo17 +>foo17 : { (x: Object): Object; (x: any): any; } >x : Object >Object : Object >Object : Object declare function foo17(x: any): any; ->foo17 : typeof foo17 +>foo17 : { (x: Object): Object; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any declare function foo18(x: {}): {}; ->foo18 : typeof foo18 +>foo18 : { (x: {}): {}; (x: any): any; } >x : {} declare function foo18(x: any): any; ->foo18 : typeof foo18 +>foo18 : { (x: {}): {}; (x: any): any; } >x : any var r3 = foo3(a); // any >r3 : any >foo3(a) : any ->foo3 : typeof foo3 +>foo3 : { (x: string): string; (x: any): any; } >a : any diff --git a/tests/baselines/reference/anyAssignableToEveryType.types b/tests/baselines/reference/anyAssignableToEveryType.types index 36c24c6ac3d..c2a9b324d96 100644 --- a/tests/baselines/reference/anyAssignableToEveryType.types +++ b/tests/baselines/reference/anyAssignableToEveryType.types @@ -121,7 +121,7 @@ var q: String = a; >a : any function foo(x: T, y: U, z: V) { ->foo : typeof foo +>foo : (x: T, y: U, z: V) => void >T : T >U : U >V : V diff --git a/tests/baselines/reference/arguments.types b/tests/baselines/reference/arguments.types index 5adaf29a8ba..1902e459316 100644 --- a/tests/baselines/reference/arguments.types +++ b/tests/baselines/reference/arguments.types @@ -1,6 +1,6 @@ === tests/cases/compiler/arguments.ts === function f() { ->f : typeof f +>f : () => void var x=arguments[12]; >x : any diff --git a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.types b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.types index 9afd479dc7f..c4889e223bb 100644 --- a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.types +++ b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.types @@ -1,11 +1,11 @@ === tests/cases/compiler/arrayLiteralInNonVarArgParameter.ts === function panic(val: string[], ...opt: string[]) { } ->panic : typeof panic +>panic : (val: string[], ...opt: string[]) => void >val : string[] >opt : string[] panic([], 'one', 'two'); >panic([], 'one', 'two') : void ->panic : typeof panic +>panic : (val: string[], ...opt: string[]) => void >[] : string[] diff --git a/tests/baselines/reference/arrowFunctionExpressions.types b/tests/baselines/reference/arrowFunctionExpressions.types index 8a27de65225..5807f6d6a7d 100644 --- a/tests/baselines/reference/arrowFunctionExpressions.types +++ b/tests/baselines/reference/arrowFunctionExpressions.types @@ -118,7 +118,7 @@ var e: number; // Arrow function used in arrow function used in function function someFn() { ->someFn : typeof someFn +>someFn : () => void var arr = (n: number) => (p: number) => p * n; >arr : (n: number) => (p: number) => number @@ -141,7 +141,7 @@ function someFn() { // Arrow function used in function function someOtherFn() { ->someOtherFn : typeof someOtherFn +>someOtherFn : () => void var arr = (n: number) => '' + n; >arr : (n: number) => string @@ -160,7 +160,7 @@ function someOtherFn() { // Arrow function used in nested function in function function outerFn() { ->outerFn : typeof outerFn +>outerFn : () => void function innerFn() { >innerFn : () => void @@ -211,7 +211,7 @@ var g: string; // Arrow function used in nested function in arrow function in nested function function someOuterFn() { ->someOuterFn : typeof someOuterFn +>someOuterFn : () => (n: string) => () => () => number var arr = (n: string) => { >arr : (n: string) => () => () => number @@ -239,7 +239,7 @@ var h = someOuterFn()('')()(); >someOuterFn()('')() : () => number >someOuterFn()('') : () => () => number >someOuterFn() : (n: string) => () => () => number ->someOuterFn : typeof someOuterFn +>someOuterFn : () => (n: string) => () => () => number h.toExponential(); >h.toExponential() : string @@ -249,7 +249,7 @@ h.toExponential(); // Arrow function used in try/catch/finally in function function tryCatchFn() { ->tryCatchFn : typeof tryCatchFn +>tryCatchFn : () => void try { var x = () => this; diff --git a/tests/baselines/reference/asiAmbientFunctionDeclaration.types b/tests/baselines/reference/asiAmbientFunctionDeclaration.types index 63d2c18f44a..40ad7f2ba94 100644 --- a/tests/baselines/reference/asiAmbientFunctionDeclaration.types +++ b/tests/baselines/reference/asiAmbientFunctionDeclaration.types @@ -1,4 +1,4 @@ === tests/cases/compiler/asiAmbientFunctionDeclaration.ts === declare function foo() ->foo : typeof foo +>foo : () => any diff --git a/tests/baselines/reference/assignEveryTypeToAny.types b/tests/baselines/reference/assignEveryTypeToAny.types index 379d705cc4b..b25aba00837 100644 --- a/tests/baselines/reference/assignEveryTypeToAny.types +++ b/tests/baselines/reference/assignEveryTypeToAny.types @@ -150,7 +150,7 @@ x = { f(x: T) { return x; } } >x : T function j(a: T) { ->j : typeof j +>j : (a: T) => void >T : T >a : T >T : T diff --git a/tests/baselines/reference/assignmentCompatForEnums.types b/tests/baselines/reference/assignmentCompatForEnums.types index c8026077aec..53e8caab638 100644 --- a/tests/baselines/reference/assignmentCompatForEnums.types +++ b/tests/baselines/reference/assignmentCompatForEnums.types @@ -10,16 +10,16 @@ var list = {}; function returnType(): TokenType { return null; } ->returnType : typeof returnType +>returnType : () => TokenType >TokenType : TokenType function foo() { ->foo : typeof foo +>foo : () => void var x = returnType(); >x : TokenType >returnType() : TokenType ->returnType : typeof returnType +>returnType : () => TokenType var x: TokenType = list['one']; >x : TokenType diff --git a/tests/baselines/reference/assignmentCompatOnNew.types b/tests/baselines/reference/assignmentCompatOnNew.types index a6fb74f6184..19994e61df8 100644 --- a/tests/baselines/reference/assignmentCompatOnNew.types +++ b/tests/baselines/reference/assignmentCompatOnNew.types @@ -3,12 +3,12 @@ class Foo{}; >Foo : Foo function bar(x: {new(): Foo;}){} ->bar : typeof bar +>bar : (x: new () => Foo) => void >x : new () => Foo >Foo : Foo bar(Foo); // Error, but should be allowed >bar(Foo) : void ->bar : typeof bar +>bar : (x: new () => Foo) => void >Foo : typeof Foo diff --git a/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.types b/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.types index 1a8f0e6bfd2..fab8e2baae6 100644 --- a/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.types +++ b/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.types @@ -1,6 +1,6 @@ === tests/cases/compiler/assignmentCompatibilityForConstrainedTypeParameters.ts === function foo() { ->foo : typeof foo +>foo : () => void >T : T >bar : string diff --git a/tests/baselines/reference/assignmentLHSIsReference.types b/tests/baselines/reference/assignmentLHSIsReference.types index c5dc4813a5d..0d7bfad3f06 100644 --- a/tests/baselines/reference/assignmentLHSIsReference.types +++ b/tests/baselines/reference/assignmentLHSIsReference.types @@ -12,7 +12,7 @@ x1 = value; >value : any function fn1(x2: number) { ->fn1 : typeof fn1 +>fn1 : (x2: number) => void >x2 : number x2 = value; @@ -47,7 +47,7 @@ x3['a'] = value; >value : any function fn2(x4: number) { ->fn2 : typeof fn2 +>fn2 : (x4: number) => void >x4 : number (x4) = value; diff --git a/tests/baselines/reference/avoid.types b/tests/baselines/reference/avoid.types index 23e78f37613..853d93bdd79 100644 --- a/tests/baselines/reference/avoid.types +++ b/tests/baselines/reference/avoid.types @@ -1,6 +1,6 @@ === tests/cases/compiler/avoid.ts === function f() { ->f : typeof f +>f : () => void var x=1; >x : number @@ -9,12 +9,12 @@ function f() { var y=f(); // error void fn >y : void >f() : void ->f : typeof f +>f : () => void var why:any=f(); // error void fn >why : any >f() : void ->f : typeof f +>f : () => void var w:any; >w : any @@ -23,7 +23,7 @@ w=f(); // error void fn >w=f() : void >w : any >f() : void ->f : typeof f +>f : () => void class C { >C : C @@ -45,6 +45,6 @@ var z=new C().g(); // error void fn var N=new f(); // ok with void fn >N : any >new f() : any ->f : typeof f +>f : () => void diff --git a/tests/baselines/reference/badOverloadError.types b/tests/baselines/reference/badOverloadError.types index 8777296d798..837eb5c5c83 100644 --- a/tests/baselines/reference/badOverloadError.types +++ b/tests/baselines/reference/badOverloadError.types @@ -1,6 +1,6 @@ === tests/cases/compiler/badOverloadError.ts === function method() { ->method : typeof method +>method : () => void var dictionary = <{ [index: string]: string; }>{}; >dictionary : { [x: string]: string; } diff --git a/tests/baselines/reference/badThisBinding.types b/tests/baselines/reference/badThisBinding.types index 5b95cc95ba0..a6b1c478d53 100644 --- a/tests/baselines/reference/badThisBinding.types +++ b/tests/baselines/reference/badThisBinding.types @@ -1,10 +1,10 @@ === tests/cases/compiler/badThisBinding.ts === declare function foo(a:any): any; ->foo : typeof foo +>foo : (a: any) => any >a : any declare function bar(a:any): any; ->bar : typeof bar +>bar : (a: any) => any >a : any class Greeter { @@ -13,12 +13,12 @@ class Greeter { constructor() { foo(() => { >foo(() => { bar(() => { var x = this; }); }) : any ->foo : typeof foo +>foo : (a: any) => any >() => { bar(() => { var x = this; }); } : () => void bar(() => { >bar(() => { var x = this; }) : any ->bar : typeof bar +>bar : (a: any) => any >() => { var x = this; } : () => void var x = this; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.types b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.types index ae9f7c59765..3deeae69bbe 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.types +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.types @@ -102,7 +102,7 @@ var r11 = true ? base : derived2; >derived2 : Derived2 function foo5(t: T, u: U): Object { ->foo5 : typeof foo5 +>foo5 : (t: T, u: U) => Object >T : T >U : U >t : T diff --git a/tests/baselines/reference/bestCommonTypeReturnStatement.types b/tests/baselines/reference/bestCommonTypeReturnStatement.types index ce360a92ccf..3c260ea709b 100644 --- a/tests/baselines/reference/bestCommonTypeReturnStatement.types +++ b/tests/baselines/reference/bestCommonTypeReturnStatement.types @@ -14,23 +14,23 @@ interface IPromise { } function f() { ->f : typeof f +>f : () => IPromise if (true) return b(); >b() : IPromise ->b : typeof b +>b : () => IPromise return d(); >d() : IPromise ->d : typeof d +>d : () => IPromise } function b(): IPromise { return null; } ->b : typeof b +>b : () => IPromise >IPromise : IPromise function d(): IPromise { return null; } ->d : typeof d +>d : () => IPromise >IPromise : IPromise diff --git a/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.types b/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.types index 13cee004559..ce870dbc818 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.types +++ b/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.types @@ -4,7 +4,7 @@ var BOOLEAN: boolean; >BOOLEAN : boolean function foo(): boolean { return true; } ->foo : typeof foo +>foo : () => boolean class A { >A : A @@ -64,7 +64,7 @@ var ResultIsNumber6 = ~foo(); >ResultIsNumber6 : number >~foo() : number >foo() : boolean ->foo : typeof foo +>foo : () => boolean var ResultIsNumber7 = ~A.foo(); >ResultIsNumber7 : number @@ -92,7 +92,7 @@ var ResultIsNumber8 = ~~BOOLEAN; ~foo(); >~foo() : number >foo() : boolean ->foo : typeof foo +>foo : () => boolean ~true, false; >~true, false : boolean diff --git a/tests/baselines/reference/bitwiseNotOperatorWithNumberType.types b/tests/baselines/reference/bitwiseNotOperatorWithNumberType.types index 508edaf17e2..94207a56343 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithNumberType.types +++ b/tests/baselines/reference/bitwiseNotOperatorWithNumberType.types @@ -8,7 +8,7 @@ var NUMBER1: number[] = [1, 2]; >[1, 2] : number[] function foo(): number { return 1; } ->foo : typeof foo +>foo : () => number class A { >A : A @@ -89,7 +89,7 @@ var ResultIsNumber9 = ~foo(); >ResultIsNumber9 : number >~foo() : number >foo() : number ->foo : typeof foo +>foo : () => number var ResultIsNumber10 = ~A.foo(); >ResultIsNumber10 : number @@ -136,7 +136,7 @@ var ResultIsNumber13 = ~~~(NUMBER + NUMBER); ~foo(); >~foo() : number >foo() : number ->foo : typeof foo +>foo : () => number ~objA.a; >~objA.a : number diff --git a/tests/baselines/reference/bitwiseNotOperatorWithStringType.types b/tests/baselines/reference/bitwiseNotOperatorWithStringType.types index d1041f805de..dbe2f29631e 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithStringType.types +++ b/tests/baselines/reference/bitwiseNotOperatorWithStringType.types @@ -8,7 +8,7 @@ var STRING1: string[] = ["", "abc"]; >["", "abc"] : string[] function foo(): string { return "abc"; } ->foo : typeof foo +>foo : () => string class A { >A : A @@ -89,7 +89,7 @@ var ResultIsNumber9 = ~foo(); >ResultIsNumber9 : number >~foo() : number >foo() : string ->foo : typeof foo +>foo : () => string var ResultIsNumber10 = ~A.foo(); >ResultIsNumber10 : number @@ -144,7 +144,7 @@ var ResultIsNumber14 = ~~~(STRING + STRING); ~foo(); >~foo() : number >foo() : string ->foo : typeof foo +>foo : () => string ~objA.a,M.n; >~objA.a,M.n : string diff --git a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.types b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.types index f2ac424455b..34de901e3c0 100644 --- a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.types +++ b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.types @@ -2,7 +2,7 @@ // valid invocations of generic functions with no explicit type arguments provided function f(x: T): T { return null; } ->f : typeof f +>f : (x: T) => T >T : T >x : T >T : T @@ -11,7 +11,7 @@ function f(x: T): T { return null; } var r = f(1); >r : number >f(1) : number ->f : typeof f +>f : (x: T) => T var f2 = (x: T): T => { return null; } >f2 : (x: T) => T diff --git a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.types b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.types index 08288f53f7e..b8b608762f5 100644 --- a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.types +++ b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.types @@ -2,13 +2,13 @@ // Call signatures without a return type annotation and function body return 'any' function foo(x) { } ->foo : typeof foo +>foo : (x: any) => void >x : any var r = foo(1); // void since there's a body >r : void >foo(1) : void ->foo : typeof foo +>foo : (x: any) => void interface I { >I : I diff --git a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types index 6a4f5560c0d..dc6a72cf897 100644 --- a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types +++ b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types @@ -3,7 +3,7 @@ // Simple types function foo(x) { ->foo : typeof foo +>foo : (x: any) => number >x : any return 1; @@ -11,36 +11,36 @@ function foo(x) { var r = foo(1); >r : number >foo(1) : number ->foo : typeof foo +>foo : (x: any) => number function foo2(x) { ->foo2 : typeof foo2 +>foo2 : (x: any) => number >x : any return foo(x); >foo(x) : number ->foo : typeof foo +>foo : (x: any) => number >x : any } var r2 = foo2(1); >r2 : number >foo2(1) : number ->foo2 : typeof foo2 +>foo2 : (x: any) => number function foo3() { ->foo3 : typeof foo3 +>foo3 : () => any return foo3(); >foo3() : any ->foo3 : typeof foo3 +>foo3 : () => any } var r3 = foo3(); >r3 : any >foo3() : any ->foo3 : typeof foo3 +>foo3 : () => any function foo4(x: T) { ->foo4 : typeof foo4 +>foo4 : (x: T) => T >T : T >x : T >T : T @@ -51,10 +51,10 @@ function foo4(x: T) { var r4 = foo4(1); >r4 : number >foo4(1) : number ->foo4 : typeof foo4 +>foo4 : (x: T) => T function foo5(x) { ->foo5 : typeof foo5 +>foo5 : (x: any) => number >x : any if (true) { @@ -66,10 +66,10 @@ function foo5(x) { var r5 = foo5(1); >r5 : number >foo5(1) : number ->foo5 : typeof foo5 +>foo5 : (x: any) => number function foo6(x) { ->foo6 : typeof foo6 +>foo6 : (x: any) => any[] >x : any try { @@ -88,10 +88,10 @@ function foo6(x) { var r6 = foo6(1); >r6 : any[] >foo6(1) : any[] ->foo6 : typeof foo6 +>foo6 : (x: any) => any[] function foo7(x) { ->foo7 : typeof foo7 +>foo7 : (x: any) => string >x : any return typeof x; @@ -101,11 +101,11 @@ function foo7(x) { var r7 = foo7(1); >r7 : string >foo7(1) : string ->foo7 : typeof foo7 +>foo7 : (x: any) => string // object types function foo8(x: number) { ->foo8 : typeof foo8 +>foo8 : (x: number) => { x: number; } >x : number return { x: x }; @@ -116,7 +116,7 @@ function foo8(x: number) { var r8 = foo8(1); >r8 : { x: number; } >foo8(1) : { x: number; } ->foo8 : typeof foo8 +>foo8 : (x: number) => { x: number; } interface I { >I : I @@ -125,7 +125,7 @@ interface I { >foo : string } function foo9(x: number) { ->foo9 : typeof foo9 +>foo9 : (x: number) => I >x : number var i: I; @@ -138,7 +138,7 @@ function foo9(x: number) { var r9 = foo9(1); >r9 : I >foo9(1) : I ->foo9 : typeof foo9 +>foo9 : (x: number) => I class C { >C : C @@ -147,7 +147,7 @@ class C { >foo : string } function foo10(x: number) { ->foo10 : typeof foo10 +>foo10 : (x: number) => C >x : number var c: C; @@ -160,7 +160,7 @@ function foo10(x: number) { var r10 = foo10(1); >r10 : C >foo10(1) : C ->foo10 : typeof foo10 +>foo10 : (x: number) => C module M { >M : typeof M @@ -173,7 +173,7 @@ module M { >foo : string } function foo11() { ->foo11 : typeof foo11 +>foo11 : () => typeof M return M; >M : typeof M @@ -181,7 +181,7 @@ function foo11() { var r11 = foo11(); >r11 : typeof M >foo11() : typeof M ->foo11 : typeof foo11 +>foo11 : () => typeof M // merged declarations interface I2 { @@ -197,7 +197,7 @@ interface I2 { >y : number } function foo12() { ->foo12 : typeof foo12 +>foo12 : () => I2 var i2: I2; >i2 : I2 @@ -209,7 +209,7 @@ function foo12() { var r12 = foo12(); >r12 : I2 >foo12() : I2 ->foo12 : typeof foo12 +>foo12 : () => I2 function m1() { return 1; } >m1 : typeof m1 @@ -219,7 +219,7 @@ module m1 { export var y = 2; } >y : number function foo13() { ->foo13 : typeof foo13 +>foo13 : () => typeof m1 return m1; >m1 : typeof m1 @@ -227,7 +227,7 @@ function foo13() { var r13 = foo13(); >r13 : typeof m1 >foo13() : typeof m1 ->foo13 : typeof foo13 +>foo13 : () => typeof m1 class c1 { >c1 : c1 @@ -245,7 +245,7 @@ module c1 { >x : number } function foo14() { ->foo14 : typeof foo14 +>foo14 : () => typeof c1 return c1; >c1 : typeof c1 @@ -253,7 +253,7 @@ function foo14() { var r14 = foo14(); >r14 : typeof c1 >foo14() : typeof c1 ->foo14 : typeof foo14 +>foo14 : () => typeof c1 enum e1 { A } >e1 : e1 @@ -264,7 +264,7 @@ module e1 { export var y = 1; } >y : number function foo15() { ->foo15 : typeof foo15 +>foo15 : () => typeof e1 return e1; >e1 : typeof e1 @@ -272,5 +272,5 @@ function foo15() { var r15 = foo15(); >r15 : typeof e1 >foo15() : typeof e1 ->foo15 : typeof foo15 +>foo15 : () => typeof e1 diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters.types b/tests/baselines/reference/callSignaturesWithOptionalParameters.types index 199d458983c..8b1e929d9e3 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters.types +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters.types @@ -2,7 +2,7 @@ // Optional parameters should be valid in all the below casts function foo(x?: number) { } ->foo : typeof foo +>foo : (x?: number) => void >x : number var f = function foo(x?: number) { } @@ -19,11 +19,11 @@ var f2 = (x: number, y?: number) => { } foo(1); >foo(1) : void ->foo : typeof foo +>foo : (x?: number) => void foo(); >foo() : void ->foo : typeof foo +>foo : (x?: number) => void f(1); >f(1) : void diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters2.types b/tests/baselines/reference/callSignaturesWithOptionalParameters2.types index c13942a5c70..602edd911fe 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters2.types +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters2.types @@ -2,42 +2,42 @@ // Optional parameters should be valid in all the below casts function foo(x?: number); ->foo : typeof foo +>foo : (x?: number) => any >x : number function foo(x?: number) { } ->foo : typeof foo +>foo : (x?: number) => any >x : number foo(1); >foo(1) : any ->foo : typeof foo +>foo : (x?: number) => any foo(); >foo() : any ->foo : typeof foo +>foo : (x?: number) => any function foo2(x: number); ->foo2 : typeof foo2 +>foo2 : { (x: number): any; (x: number, y?: number): any; } >x : number function foo2(x: number, y?: number); ->foo2 : typeof foo2 +>foo2 : { (x: number): any; (x: number, y?: number): any; } >x : number >y : number function foo2(x: number, y?: number) { } ->foo2 : typeof foo2 +>foo2 : { (x: number): any; (x: number, y?: number): any; } >x : number >y : number foo2(1); >foo2(1) : any ->foo2 : typeof foo2 +>foo2 : { (x: number): any; (x: number, y?: number): any; } foo2(1, 2); >foo2(1, 2) : any ->foo2 : typeof foo2 +>foo2 : { (x: number): any; (x: number, y?: number): any; } class C { >C : C diff --git a/tests/baselines/reference/catch.types b/tests/baselines/reference/catch.types index 2caa04d8697..bb0b2adbefe 100644 --- a/tests/baselines/reference/catch.types +++ b/tests/baselines/reference/catch.types @@ -1,6 +1,6 @@ === tests/cases/compiler/catch.ts === function f() { ->f : typeof f +>f : () => void try {} catch(e) { } >e : any diff --git a/tests/baselines/reference/cf.types b/tests/baselines/reference/cf.types index df7dc12ce31..62dcba0ba9a 100644 --- a/tests/baselines/reference/cf.types +++ b/tests/baselines/reference/cf.types @@ -1,6 +1,6 @@ === tests/cases/compiler/cf.ts === function f() { ->f : typeof f +>f : () => void var z; >z : any diff --git a/tests/baselines/reference/chainedImportAlias.types b/tests/baselines/reference/chainedImportAlias.types index 6140d98272f..1435776fff2 100644 --- a/tests/baselines/reference/chainedImportAlias.types +++ b/tests/baselines/reference/chainedImportAlias.types @@ -8,17 +8,17 @@ import y = x; y.m.foo(); >y.m.foo() : void ->y.m.foo : typeof x.m.foo +>y.m.foo : () => void >y.m : typeof x.m >y : typeof x >m : typeof x.m ->foo : typeof x.m.foo +>foo : () => void === tests/cases/compiler/chainedImportAlias_file0.ts === export module m { >m : typeof m export function foo() { } ->foo : typeof foo +>foo : () => void } diff --git a/tests/baselines/reference/cloduleTest1.types b/tests/baselines/reference/cloduleTest1.types index 214b46c2676..a92355b483a 100644 --- a/tests/baselines/reference/cloduleTest1.types +++ b/tests/baselines/reference/cloduleTest1.types @@ -19,7 +19,7 @@ >AjaxSettings : AjaxSettings } export function ajax(options: AjaxSettings) { } ->ajax : typeof ajax +>ajax : (options: AjaxSettings) => void >options : AjaxSettings >AjaxSettings : AjaxSettings } diff --git a/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.types b/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.types index 7c22d6ddc8f..07ef123f642 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.types +++ b/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.types @@ -6,7 +6,7 @@ module M { >x : number function fn(M, p = x) { } ->fn : typeof fn +>fn : (M: any, p?: number) => void >M : any >p : number >x : number @@ -16,7 +16,7 @@ module M { >M : typeof M function fn2() { ->fn2 : typeof fn2 +>fn2 : () => void var M; >M : any @@ -31,7 +31,7 @@ module M { >M : typeof M function fn3() { ->fn3 : typeof fn3 +>fn3 : () => void function M() { >M : () => void diff --git a/tests/baselines/reference/collisionCodeGenModuleWithModuleChildren.types b/tests/baselines/reference/collisionCodeGenModuleWithModuleChildren.types index 3ed65442a0e..7853bcbdb32 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithModuleChildren.types +++ b/tests/baselines/reference/collisionCodeGenModuleWithModuleChildren.types @@ -44,7 +44,7 @@ module M { >m3 : typeof m3 function M() { ->M : typeof M +>M : () => void } var p = x; >p : number @@ -53,7 +53,7 @@ module M { var p2 = M(); >p2 : void >M() : void ->M : typeof M +>M : () => void } } diff --git a/tests/baselines/reference/collisionExportsRequireAndFunction.types b/tests/baselines/reference/collisionExportsRequireAndFunction.types index 8bf94d991f7..8b90397c6fe 100644 --- a/tests/baselines/reference/collisionExportsRequireAndFunction.types +++ b/tests/baselines/reference/collisionExportsRequireAndFunction.types @@ -1,11 +1,11 @@ === tests/cases/compiler/collisionExportsRequireAndFunction.ts === export function exports() { ->exports : typeof exports +>exports : () => number return 1; } export function require() { ->require : typeof require +>require : () => string return "require"; } diff --git a/tests/baselines/reference/collisionExportsRequireAndModule.types b/tests/baselines/reference/collisionExportsRequireAndModule.types index 9aa418cad80..c462a508d06 100644 --- a/tests/baselines/reference/collisionExportsRequireAndModule.types +++ b/tests/baselines/reference/collisionExportsRequireAndModule.types @@ -10,7 +10,7 @@ export module require { } } export function foo(): require.I { ->foo : typeof foo +>foo : () => require.I >require : unknown >I : require.I @@ -27,7 +27,7 @@ export module exports { } } export function foo2(): exports.I { ->foo2 : typeof foo2 +>foo2 : () => exports.I >exports : unknown >I : exports.I diff --git a/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.types b/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.types index b9d5b8a2606..59d90feda46 100644 --- a/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.types +++ b/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.types @@ -7,7 +7,7 @@ export module require { // no error } } export function foo(): require.I { ->foo : typeof foo +>foo : () => require.I >require : unknown >I : require.I @@ -21,7 +21,7 @@ export module exports { // no error } } export function foo2(): exports.I { ->foo2 : typeof foo2 +>foo2 : () => exports.I >exports : unknown >I : exports.I diff --git a/tests/baselines/reference/collisionExportsRequireAndVar.types b/tests/baselines/reference/collisionExportsRequireAndVar.types index 112b8ec838e..656c705aa23 100644 --- a/tests/baselines/reference/collisionExportsRequireAndVar.types +++ b/tests/baselines/reference/collisionExportsRequireAndVar.types @@ -1,6 +1,6 @@ === tests/cases/compiler/collisionExportsRequireAndVar.ts === export function foo() { ->foo : typeof foo +>foo : () => void } var exports = 1; >exports : number diff --git a/tests/baselines/reference/commaOperator1.types b/tests/baselines/reference/commaOperator1.types index 17b8c3cad00..52a36e33024 100644 --- a/tests/baselines/reference/commaOperator1.types +++ b/tests/baselines/reference/commaOperator1.types @@ -12,7 +12,7 @@ var v1 = ((1, 2, 3), 4, 5, (6, 7)); >6, 7 : number function f1() { ->f1 : typeof f1 +>f1 : () => number var a = 1; >a : number diff --git a/tests/baselines/reference/commaOperatorOtherValidOperation.types b/tests/baselines/reference/commaOperatorOtherValidOperation.types index 57538f4a1cb..e42991e7b5a 100644 --- a/tests/baselines/reference/commaOperatorOtherValidOperation.types +++ b/tests/baselines/reference/commaOperatorOtherValidOperation.types @@ -16,7 +16,7 @@ for (var i = 0, j = 10; i < j; i++, j--) //Comma operator in fuction arguments and return function foo(x: number, y: string) ->foo : typeof foo +>foo : (x: number, y: string) => string >x : number >y : string { @@ -28,11 +28,11 @@ function foo(x: number, y: string) var resultIsString = foo(1, "123"); >resultIsString : string >foo(1, "123") : string ->foo : typeof foo +>foo : (x: number, y: string) => string //TypeParameters function foo1() ->foo1 : typeof foo1 +>foo1 : () => void >T1 : T1 >T2 : T2 { diff --git a/tests/baselines/reference/commentInEmptyParameterList1.types b/tests/baselines/reference/commentInEmptyParameterList1.types index c2e120d1ffb..dd708e8c9ac 100644 --- a/tests/baselines/reference/commentInEmptyParameterList1.types +++ b/tests/baselines/reference/commentInEmptyParameterList1.types @@ -1,4 +1,4 @@ === tests/cases/compiler/commentInEmptyParameterList1.ts === function foo(/** nothing */) { ->foo : typeof foo +>foo : () => void } diff --git a/tests/baselines/reference/commentOnSignature1.types b/tests/baselines/reference/commentOnSignature1.types index 6630fb2cf1e..6fd4516d4e9 100644 --- a/tests/baselines/reference/commentOnSignature1.types +++ b/tests/baselines/reference/commentOnSignature1.types @@ -1,15 +1,15 @@ === tests/cases/compiler/commentOnSignature1.ts === /*! Keep this pinned comment */ function foo(n: number): void; ->foo : typeof foo +>foo : { (n: number): void; (s: string): void; } >n : number // Don't keep this comment. function foo(s: string): void; ->foo : typeof foo +>foo : { (n: number): void; (s: string): void; } >s : string function foo(a: any): void { ->foo : typeof foo +>foo : { (n: number): void; (s: string): void; } >a : any } diff --git a/tests/baselines/reference/commentOnSimpleArrowFunctionBody1.types b/tests/baselines/reference/commentOnSimpleArrowFunctionBody1.types index 99ec3c9a021..916a03eb65e 100644 --- a/tests/baselines/reference/commentOnSimpleArrowFunctionBody1.types +++ b/tests/baselines/reference/commentOnSimpleArrowFunctionBody1.types @@ -1,13 +1,13 @@ === tests/cases/compiler/commentOnSimpleArrowFunctionBody1.ts === function Foo(x: any) ->Foo : typeof Foo +>Foo : (x: any) => void >x : any { } Foo(() => >Foo(() => // do something 127) : void ->Foo : typeof Foo +>Foo : (x: any) => void >() => // do something 127 : () => number // do something diff --git a/tests/baselines/reference/commentsCommentParsing.types b/tests/baselines/reference/commentsCommentParsing.types index d10a339868e..a9194f9a63a 100644 --- a/tests/baselines/reference/commentsCommentParsing.types +++ b/tests/baselines/reference/commentsCommentParsing.types @@ -2,41 +2,41 @@ /// This is simple /// comments function simple() { ->simple : typeof simple +>simple : () => void } simple(); >simple() : void ->simple : typeof simple +>simple : () => void /// multiLine /// Comments /// This is example of multiline /// comments /// Another multiLine function multiLine() { ->multiLine : typeof multiLine +>multiLine : () => void } multiLine(); >multiLine() : void ->multiLine : typeof multiLine +>multiLine : () => void /** this is eg of single line jsdoc style comment */ function jsDocSingleLine() { ->jsDocSingleLine : typeof jsDocSingleLine +>jsDocSingleLine : () => void } jsDocSingleLine(); >jsDocSingleLine() : void ->jsDocSingleLine : typeof jsDocSingleLine +>jsDocSingleLine : () => void /** this is multiple line jsdoc stule comment *New line1 *New Line2*/ function jsDocMultiLine() { ->jsDocMultiLine : typeof jsDocMultiLine +>jsDocMultiLine : () => void } jsDocMultiLine(); >jsDocMultiLine() : void ->jsDocMultiLine : typeof jsDocMultiLine +>jsDocMultiLine : () => void /** this is multiple line jsdoc stule comment *New line1 @@ -44,60 +44,60 @@ jsDocMultiLine(); /** Shoul mege this line as well * and this too*/ /** Another this one too*/ function jsDocMultiLineMerge() { ->jsDocMultiLineMerge : typeof jsDocMultiLineMerge +>jsDocMultiLineMerge : () => void } jsDocMultiLineMerge(); >jsDocMultiLineMerge() : void ->jsDocMultiLineMerge : typeof jsDocMultiLineMerge +>jsDocMultiLineMerge : () => void /// Triple slash comment /** jsdoc comment */ function jsDocMixedComments1() { ->jsDocMixedComments1 : typeof jsDocMixedComments1 +>jsDocMixedComments1 : () => void } jsDocMixedComments1(); >jsDocMixedComments1() : void ->jsDocMixedComments1 : typeof jsDocMixedComments1 +>jsDocMixedComments1 : () => void /// Triple slash comment /** jsdoc comment */ /*** another jsDocComment*/ function jsDocMixedComments2() { ->jsDocMixedComments2 : typeof jsDocMixedComments2 +>jsDocMixedComments2 : () => void } jsDocMixedComments2(); >jsDocMixedComments2() : void ->jsDocMixedComments2 : typeof jsDocMixedComments2 +>jsDocMixedComments2 : () => void /** jsdoc comment */ /*** another jsDocComment*/ /// Triple slash comment function jsDocMixedComments3() { ->jsDocMixedComments3 : typeof jsDocMixedComments3 +>jsDocMixedComments3 : () => void } jsDocMixedComments3(); >jsDocMixedComments3() : void ->jsDocMixedComments3 : typeof jsDocMixedComments3 +>jsDocMixedComments3 : () => void /** jsdoc comment */ /*** another jsDocComment*/ /// Triple slash comment /// Triple slash comment 2 function jsDocMixedComments4() { ->jsDocMixedComments4 : typeof jsDocMixedComments4 +>jsDocMixedComments4 : () => void } jsDocMixedComments4(); >jsDocMixedComments4() : void ->jsDocMixedComments4 : typeof jsDocMixedComments4 +>jsDocMixedComments4 : () => void /// Triple slash comment 1 /** jsdoc comment */ /*** another jsDocComment*/ /// Triple slash comment /// Triple slash comment 2 function jsDocMixedComments5() { ->jsDocMixedComments5 : typeof jsDocMixedComments5 +>jsDocMixedComments5 : () => void } jsDocMixedComments5(); >jsDocMixedComments5() : void ->jsDocMixedComments5 : typeof jsDocMixedComments5 +>jsDocMixedComments5 : () => void /*** another jsDocComment*/ /// Triple slash comment 1 @@ -105,41 +105,41 @@ jsDocMixedComments5(); /// Triple slash comment 2 /** jsdoc comment */ function jsDocMixedComments6() { ->jsDocMixedComments6 : typeof jsDocMixedComments6 +>jsDocMixedComments6 : () => void } jsDocMixedComments6(); >jsDocMixedComments6() : void ->jsDocMixedComments6 : typeof jsDocMixedComments6 +>jsDocMixedComments6 : () => void // This shoulnot be help comment function noHelpComment1() { ->noHelpComment1 : typeof noHelpComment1 +>noHelpComment1 : () => void } noHelpComment1(); >noHelpComment1() : void ->noHelpComment1 : typeof noHelpComment1 +>noHelpComment1 : () => void /* This shoulnot be help comment */ function noHelpComment2() { ->noHelpComment2 : typeof noHelpComment2 +>noHelpComment2 : () => void } noHelpComment2(); >noHelpComment2() : void ->noHelpComment2 : typeof noHelpComment2 +>noHelpComment2 : () => void function noHelpComment3() { ->noHelpComment3 : typeof noHelpComment3 +>noHelpComment3 : () => void } noHelpComment3(); >noHelpComment3() : void ->noHelpComment3 : typeof noHelpComment3 +>noHelpComment3 : () => void /** Adds two integers and returns the result * @param {number} a first number * @param b second number */ function sum(a: number, b: number) { ->sum : typeof sum +>sum : (a: number, b: number) => number >a : number >b : number @@ -150,7 +150,7 @@ function sum(a: number, b: number) { } sum(10, 20); >sum(10, 20) : number ->sum : typeof sum +>sum : (a: number, b: number) => number /** This is multiplication function*/ /** @param */ @@ -160,7 +160,7 @@ sum(10, 20); @param d @anotherTag*/ /** @param e LastParam @anotherTag*/ function multiply(a: number, b: number, c?: number, d?, e?) { ->multiply : typeof multiply +>multiply : (a: number, b: number, c?: number, d?: any, e?: any) => void >a : number >b : number >c : number @@ -171,16 +171,16 @@ function multiply(a: number, b: number, c?: number, d?, e?) { * @param { string} b about b */ function f1(a: number); ->f1 : typeof f1 +>f1 : { (a: number): any; (b: string): any; } >a : number function f1(b: string); ->f1 : typeof f1 +>f1 : { (a: number): any; (b: string): any; } >b : string /**@param opt optional parameter*/ function f1(aOrb, opt?) { ->f1 : typeof f1 +>f1 : { (a: number): any; (b: string): any; } >aOrb : any >opt : any @@ -196,7 +196,7 @@ function f1(aOrb, opt?) { @param { { { () => string; } } f this is optional param f */ function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string) { ->subtract : typeof subtract +>subtract : (a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string) => void >a : number >b : number >c : () => string @@ -210,7 +210,7 @@ function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: @returnType { number } it is return type */ function square(a: number) { ->square : typeof square +>square : (a: number) => number >a : number return a * a; @@ -224,7 +224,7 @@ function square(a: number) { @param { number} b this is b */ function divide(a: number, b: number) { ->divide : typeof divide +>divide : (a: number, b: number) => void >a : number >b : number } @@ -233,7 +233,7 @@ function divide(a: number, b: number) { *@param c it is third parameter */ function jsDocParamTest(/** this is inline comment for a */a: number, /** this is inline comment for b*/ b: number, c: number, d: number) { ->jsDocParamTest : typeof jsDocParamTest +>jsDocParamTest : (a: number, b: number, c: number, d: number) => number >a : number >b : number >c : number diff --git a/tests/baselines/reference/commentsExternalModules.types b/tests/baselines/reference/commentsExternalModules.types index b018a5de6b3..56b6b338f4d 100644 --- a/tests/baselines/reference/commentsExternalModules.types +++ b/tests/baselines/reference/commentsExternalModules.types @@ -5,11 +5,11 @@ import extMod = require("commentsExternalModules_0"); // trailing comment1 extMod.m1.fooExport(); >extMod.m1.fooExport() : number ->extMod.m1.fooExport : typeof extMod.m1.fooExport +>extMod.m1.fooExport : () => number >extMod.m1 : typeof extMod.m1 >extMod : typeof extMod >m1 : typeof extMod.m1 ->fooExport : typeof extMod.m1.fooExport +>fooExport : () => number var newVar = new extMod.m1.m2.c(); >newVar : extMod.m1.m2.c @@ -24,11 +24,11 @@ var newVar = new extMod.m1.m2.c(); extMod.m4.fooExport(); >extMod.m4.fooExport() : number ->extMod.m4.fooExport : typeof extMod.m4.fooExport +>extMod.m4.fooExport : () => number >extMod.m4 : typeof extMod.m4 >extMod : typeof extMod >m4 : typeof extMod.m4 ->fooExport : typeof extMod.m4.fooExport +>fooExport : () => number var newVar2 = new extMod.m4.m2.c(); >newVar2 : extMod.m4.m2.c @@ -53,7 +53,7 @@ export module m1 { /** foo's comment*/ function foo() { ->foo : typeof foo +>foo : () => number return b; >b : number @@ -75,18 +75,18 @@ export module m1 { } /** exported function*/ export function fooExport() { ->fooExport : typeof fooExport +>fooExport : () => number return foo(); >foo() : number ->foo : typeof foo +>foo : () => number } } m1.fooExport(); >m1.fooExport() : number ->m1.fooExport : typeof m1.fooExport +>m1.fooExport : () => number >m1 : typeof m1 ->fooExport : typeof m1.fooExport +>fooExport : () => number var myvar = new m1.m2.c(); >myvar : m1.m2.c @@ -108,7 +108,7 @@ export module m4 { /** foo's comment */ function foo() { ->foo : typeof foo +>foo : () => number return b; >b : number @@ -131,18 +131,18 @@ export module m4 { } /** exported function */ export function fooExport() { ->fooExport : typeof fooExport +>fooExport : () => number return foo(); >foo() : number ->foo : typeof foo +>foo : () => number } } m4.fooExport(); >m4.fooExport() : number ->m4.fooExport : typeof m4.fooExport +>m4.fooExport : () => number >m4 : typeof m4 ->fooExport : typeof m4.fooExport +>fooExport : () => number var myvar2 = new m4.m2.c(); >myvar2 : m4.m2.c diff --git a/tests/baselines/reference/commentsExternalModules2.types b/tests/baselines/reference/commentsExternalModules2.types index f6f004654d2..556b5d11d35 100644 --- a/tests/baselines/reference/commentsExternalModules2.types +++ b/tests/baselines/reference/commentsExternalModules2.types @@ -5,11 +5,11 @@ import extMod = require("commentsExternalModules2_0"); // trailing comment 1 extMod.m1.fooExport(); >extMod.m1.fooExport() : number ->extMod.m1.fooExport : typeof extMod.m1.fooExport +>extMod.m1.fooExport : () => number >extMod.m1 : typeof extMod.m1 >extMod : typeof extMod >m1 : typeof extMod.m1 ->fooExport : typeof extMod.m1.fooExport +>fooExport : () => number export var newVar = new extMod.m1.m2.c(); >newVar : extMod.m1.m2.c @@ -24,11 +24,11 @@ export var newVar = new extMod.m1.m2.c(); extMod.m4.fooExport(); >extMod.m4.fooExport() : number ->extMod.m4.fooExport : typeof extMod.m4.fooExport +>extMod.m4.fooExport : () => number >extMod.m4 : typeof extMod.m4 >extMod : typeof extMod >m4 : typeof extMod.m4 ->fooExport : typeof extMod.m4.fooExport +>fooExport : () => number export var newVar2 = new extMod.m4.m2.c(); >newVar2 : extMod.m4.m2.c @@ -53,7 +53,7 @@ export module m1 { /** foo's comment*/ function foo() { ->foo : typeof foo +>foo : () => number return b; >b : number @@ -75,18 +75,18 @@ export module m1 { } /** exported function*/ export function fooExport() { ->fooExport : typeof fooExport +>fooExport : () => number return foo(); >foo() : number ->foo : typeof foo +>foo : () => number } } m1.fooExport(); >m1.fooExport() : number ->m1.fooExport : typeof m1.fooExport +>m1.fooExport : () => number >m1 : typeof m1 ->fooExport : typeof m1.fooExport +>fooExport : () => number var myvar = new m1.m2.c(); >myvar : m1.m2.c @@ -108,7 +108,7 @@ export module m4 { /** foo's comment */ function foo() { ->foo : typeof foo +>foo : () => number return b; >b : number @@ -131,18 +131,18 @@ export module m4 { } /** exported function */ export function fooExport() { ->fooExport : typeof fooExport +>fooExport : () => number return foo(); >foo() : number ->foo : typeof foo +>foo : () => number } } m4.fooExport(); >m4.fooExport() : number ->m4.fooExport : typeof m4.fooExport +>m4.fooExport : () => number >m4 : typeof m4 ->fooExport : typeof m4.fooExport +>fooExport : () => number var myvar2 = new m4.m2.c(); >myvar2 : m4.m2.c diff --git a/tests/baselines/reference/commentsExternalModules3.types b/tests/baselines/reference/commentsExternalModules3.types index f6f004654d2..556b5d11d35 100644 --- a/tests/baselines/reference/commentsExternalModules3.types +++ b/tests/baselines/reference/commentsExternalModules3.types @@ -5,11 +5,11 @@ import extMod = require("commentsExternalModules2_0"); // trailing comment 1 extMod.m1.fooExport(); >extMod.m1.fooExport() : number ->extMod.m1.fooExport : typeof extMod.m1.fooExport +>extMod.m1.fooExport : () => number >extMod.m1 : typeof extMod.m1 >extMod : typeof extMod >m1 : typeof extMod.m1 ->fooExport : typeof extMod.m1.fooExport +>fooExport : () => number export var newVar = new extMod.m1.m2.c(); >newVar : extMod.m1.m2.c @@ -24,11 +24,11 @@ export var newVar = new extMod.m1.m2.c(); extMod.m4.fooExport(); >extMod.m4.fooExport() : number ->extMod.m4.fooExport : typeof extMod.m4.fooExport +>extMod.m4.fooExport : () => number >extMod.m4 : typeof extMod.m4 >extMod : typeof extMod >m4 : typeof extMod.m4 ->fooExport : typeof extMod.m4.fooExport +>fooExport : () => number export var newVar2 = new extMod.m4.m2.c(); >newVar2 : extMod.m4.m2.c @@ -53,7 +53,7 @@ export module m1 { /** foo's comment*/ function foo() { ->foo : typeof foo +>foo : () => number return b; >b : number @@ -75,18 +75,18 @@ export module m1 { } /** exported function*/ export function fooExport() { ->fooExport : typeof fooExport +>fooExport : () => number return foo(); >foo() : number ->foo : typeof foo +>foo : () => number } } m1.fooExport(); >m1.fooExport() : number ->m1.fooExport : typeof m1.fooExport +>m1.fooExport : () => number >m1 : typeof m1 ->fooExport : typeof m1.fooExport +>fooExport : () => number var myvar = new m1.m2.c(); >myvar : m1.m2.c @@ -108,7 +108,7 @@ export module m4 { /** foo's comment */ function foo() { ->foo : typeof foo +>foo : () => number return b; >b : number @@ -131,18 +131,18 @@ export module m4 { } /** exported function */ export function fooExport() { ->fooExport : typeof fooExport +>fooExport : () => number return foo(); >foo() : number ->foo : typeof foo +>foo : () => number } } m4.fooExport(); >m4.fooExport() : number ->m4.fooExport : typeof m4.fooExport +>m4.fooExport : () => number >m4 : typeof m4 ->fooExport : typeof m4.fooExport +>fooExport : () => number var myvar2 = new m4.m2.c(); >myvar2 : m4.m2.c diff --git a/tests/baselines/reference/commentsFunction.types b/tests/baselines/reference/commentsFunction.types index 6b8dd2dec26..6d37e1732e0 100644 --- a/tests/baselines/reference/commentsFunction.types +++ b/tests/baselines/reference/commentsFunction.types @@ -2,16 +2,16 @@ /** This comment should appear for foo*/ function foo() { ->foo : typeof foo +>foo : () => void } /* trailing comment of function */ foo(); >foo() : void ->foo : typeof foo +>foo : () => void /** This is comment for function signature*/ function fooWithParameters(/** this is comment about a*/a: string, ->fooWithParameters : typeof fooWithParameters +>fooWithParameters : (a: string, b: number) => void >a : string /** this is comment for b*/ @@ -25,7 +25,7 @@ function fooWithParameters(/** this is comment about a*/a: string, } // trailing comment of function fooWithParameters("a", 10); >fooWithParameters("a", 10) : void ->fooWithParameters : typeof fooWithParameters +>fooWithParameters : (a: string, b: number) => void /** fooFunc * comment @@ -68,19 +68,19 @@ lambddaNoVarComment(10, 20); >lambddaNoVarComment : (a: number, b: number) => number function blah(a: string /* multiline trailing comment ->blah : typeof blah +>blah : (a: string) => void >a : string multiline */) { } function blah2(a: string /* single line multiple trailing comments */ /* second */) { ->blah2 : typeof blah2 +>blah2 : (a: string) => void >a : string } function blah3(a: string // trailing commen single line ->blah3 : typeof blah3 +>blah3 : (a: string) => void >a : string ) { @@ -104,19 +104,19 @@ lambdaFoo = (a, b) => a * b; // This is trailing comment >() => 0 : () => number function blah4(/*1*/a: string/*2*/,/*3*/b: string/*4*/) { ->blah4 : typeof blah4 +>blah4 : (a: string, b: string) => void >a : string >b : string } function foo1() { ->foo1 : typeof foo1 +>foo1 : () => void // should emit this } function foo2() { ->foo2 : typeof foo2 +>foo2 : () => void /// This is some detached comment diff --git a/tests/baselines/reference/commentsModules.types b/tests/baselines/reference/commentsModules.types index 88fbda685e1..1027f1ce308 100644 --- a/tests/baselines/reference/commentsModules.types +++ b/tests/baselines/reference/commentsModules.types @@ -9,7 +9,7 @@ module m1 { /** foo's comment*/ function foo() { ->foo : typeof foo +>foo : () => number return b; >b : number @@ -31,16 +31,16 @@ module m1 { } /** exported function*/ export function fooExport() { ->fooExport : typeof fooExport +>fooExport : () => number return foo(); >foo() : number ->foo : typeof foo +>foo : () => number } // shouldn't appear export function foo2Export(/**hm*/ a: string) { ->foo2Export : typeof foo2Export +>foo2Export : (a: string) => void >a : string } @@ -48,21 +48,21 @@ module m1 { * comment */ export function foo3Export() { ->foo3Export : typeof foo3Export +>foo3Export : () => void } /** foo4Export * comment */ function foo4Export() { ->foo4Export : typeof foo4Export +>foo4Export : () => void } } // trailing comment module m1.fooExport(); >m1.fooExport() : number ->m1.fooExport : typeof m1.fooExport +>m1.fooExport : () => number >m1 : typeof m1 ->fooExport : typeof m1.fooExport +>fooExport : () => number var myvar = new m1.m2.c(); >myvar : m1.m2.c diff --git a/tests/baselines/reference/commentsOverloads.types b/tests/baselines/reference/commentsOverloads.types index c9fc0517fd4..9984c1b5b26 100644 --- a/tests/baselines/reference/commentsOverloads.types +++ b/tests/baselines/reference/commentsOverloads.types @@ -1,96 +1,96 @@ === tests/cases/compiler/commentsOverloads.ts === /** this is signature 1*/ function f1(/**param a*/a: number): number; ->f1 : typeof f1 +>f1 : { (a: number): number; (b: string): number; } >a : number function f1(b: string): number; ->f1 : typeof f1 +>f1 : { (a: number): number; (b: string): number; } >b : string function f1(aOrb: any) { ->f1 : typeof f1 +>f1 : { (a: number): number; (b: string): number; } >aOrb : any return 10; } f1("hello"); >f1("hello") : number ->f1 : typeof f1 +>f1 : { (a: number): number; (b: string): number; } f1(10); >f1(10) : number ->f1 : typeof f1 +>f1 : { (a: number): number; (b: string): number; } function f2(a: number): number; ->f2 : typeof f2 +>f2 : { (a: number): number; (b: string): number; } >a : number /** this is signature 2*/ function f2(b: string): number; ->f2 : typeof f2 +>f2 : { (a: number): number; (b: string): number; } >b : string /** this is f2 var comment*/ function f2(aOrb: any) { ->f2 : typeof f2 +>f2 : { (a: number): number; (b: string): number; } >aOrb : any return 10; } f2("hello"); >f2("hello") : number ->f2 : typeof f2 +>f2 : { (a: number): number; (b: string): number; } f2(10); >f2(10) : number ->f2 : typeof f2 +>f2 : { (a: number): number; (b: string): number; } function f3(a: number): number; ->f3 : typeof f3 +>f3 : { (a: number): number; (b: string): number; } >a : number function f3(b: string): number; ->f3 : typeof f3 +>f3 : { (a: number): number; (b: string): number; } >b : string function f3(aOrb: any) { ->f3 : typeof f3 +>f3 : { (a: number): number; (b: string): number; } >aOrb : any return 10; } f3("hello"); >f3("hello") : number ->f3 : typeof f3 +>f3 : { (a: number): number; (b: string): number; } f3(10); >f3(10) : number ->f3 : typeof f3 +>f3 : { (a: number): number; (b: string): number; } /** this is signature 4 - with number parameter*/ function f4(/**param a*/a: number): number; ->f4 : typeof f4 +>f4 : { (a: number): number; (b: string): number; } >a : number /** this is signature 4 - with string parameter*/ function f4(b: string): number; ->f4 : typeof f4 +>f4 : { (a: number): number; (b: string): number; } >b : string function f4(aOrb: any) { ->f4 : typeof f4 +>f4 : { (a: number): number; (b: string): number; } >aOrb : any return 10; } f4("hello"); >f4("hello") : number ->f4 : typeof f4 +>f4 : { (a: number): number; (b: string): number; } f4(10); >f4(10) : number ->f4 : typeof f4 +>f4 : { (a: number): number; (b: string): number; } interface i1 { >i1 : i1 diff --git a/tests/baselines/reference/commentsTypeParameters.types b/tests/baselines/reference/commentsTypeParameters.types index 43344f1a826..573dabed7da 100644 --- a/tests/baselines/reference/commentsTypeParameters.types +++ b/tests/baselines/reference/commentsTypeParameters.types @@ -33,7 +33,7 @@ class C { } function compare(a: T, b: T) { ->compare : typeof compare +>compare : (a: T, b: T) => boolean >T : T >a : T >T : T diff --git a/tests/baselines/reference/commentsdoNotEmitComments.types b/tests/baselines/reference/commentsdoNotEmitComments.types index 48a5904f44e..c42d3d2c17c 100644 --- a/tests/baselines/reference/commentsdoNotEmitComments.types +++ b/tests/baselines/reference/commentsdoNotEmitComments.types @@ -6,7 +6,7 @@ var myVariable = 10; /** function comments*/ function foo(/** parameter comment*/p: number) { ->foo : typeof foo +>foo : (p: number) => void >p : number } @@ -16,7 +16,7 @@ var fooVar: () => void; foo(50); >foo(50) : void ->foo : typeof foo +>foo : (p: number) => void fooVar(); >fooVar() : void diff --git a/tests/baselines/reference/commentsemitComments.types b/tests/baselines/reference/commentsemitComments.types index 74747a4161d..b87ef5ad6fd 100644 --- a/tests/baselines/reference/commentsemitComments.types +++ b/tests/baselines/reference/commentsemitComments.types @@ -6,7 +6,7 @@ var myVariable = 10; /** function comments*/ function foo(/** parameter comment*/p: number) { ->foo : typeof foo +>foo : (p: number) => void >p : number } @@ -16,7 +16,7 @@ var fooVar: () => void; foo(50); >foo(50) : void ->foo : typeof foo +>foo : (p: number) => void fooVar(); >fooVar() : void diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalTypeParameter.types b/tests/baselines/reference/comparisonOperatorWithIdenticalTypeParameter.types index 32a6a69f671..b545fdc9f1a 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalTypeParameter.types +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalTypeParameter.types @@ -1,6 +1,6 @@ === tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalTypeParameter.ts === function foo(t: T) { ->foo : typeof foo +>foo : (t: T) => void >T : T >t : T >T : T diff --git a/tests/baselines/reference/comparisonOperatorWithOneOperandIsAny.types b/tests/baselines/reference/comparisonOperatorWithOneOperandIsAny.types index a4be3dfa27d..e132f03cfa3 100644 --- a/tests/baselines/reference/comparisonOperatorWithOneOperandIsAny.types +++ b/tests/baselines/reference/comparisonOperatorWithOneOperandIsAny.types @@ -9,7 +9,7 @@ enum E { a, b, c } >c : E function foo(t: T) { ->foo : typeof foo +>foo : (t: T) => void >T : T >t : T >T : T diff --git a/tests/baselines/reference/comparisonOperatorWithOneOperandIsNull.types b/tests/baselines/reference/comparisonOperatorWithOneOperandIsNull.types index a1ed285e96c..d1b30eb7f6a 100644 --- a/tests/baselines/reference/comparisonOperatorWithOneOperandIsNull.types +++ b/tests/baselines/reference/comparisonOperatorWithOneOperandIsNull.types @@ -6,7 +6,7 @@ enum E { a, b, c } >c : E function foo(t: T) { ->foo : typeof foo +>foo : (t: T) => void >T : T >t : T >T : T diff --git a/tests/baselines/reference/comparisonOperatorWithOneOperandIsUndefined.types b/tests/baselines/reference/comparisonOperatorWithOneOperandIsUndefined.types index a7b92a27c40..b4a70c3e3d6 100644 --- a/tests/baselines/reference/comparisonOperatorWithOneOperandIsUndefined.types +++ b/tests/baselines/reference/comparisonOperatorWithOneOperandIsUndefined.types @@ -10,7 +10,7 @@ enum E { a, b, c } >c : E function foo(t: T) { ->foo : typeof foo +>foo : (t: T) => void >T : T >t : T >T : T diff --git a/tests/baselines/reference/compositeGenericFunction.types b/tests/baselines/reference/compositeGenericFunction.types index 2711c0fabc0..421b7bbe514 100644 --- a/tests/baselines/reference/compositeGenericFunction.types +++ b/tests/baselines/reference/compositeGenericFunction.types @@ -1,13 +1,13 @@ === tests/cases/compiler/compositeGenericFunction.ts === function f(value: T) { return value; }; ->f : typeof f +>f : (value: T) => T >T : T >value : T >T : T >value : T function h(func: (x: number) => R): R { return null; } ->h : typeof h +>h : (func: (x: number) => R) => R >R : R >func : (x: number) => R >x : number @@ -17,12 +17,12 @@ function h(func: (x: number) => R): R { return null; } var z: number = h(f); >z : number >h(f) : number ->h : typeof h ->f : typeof f +>h : (func: (x: number) => R) => R +>f : (value: T) => T var z: number = h(f); >z : number >h(f) : number ->h : typeof h ->f : typeof f +>h : (func: (x: number) => R) => R +>f : (value: T) => T diff --git a/tests/baselines/reference/compoundAssignmentLHSIsReference.types b/tests/baselines/reference/compoundAssignmentLHSIsReference.types index 1234d6fb876..e30cf19f3e3 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsReference.types +++ b/tests/baselines/reference/compoundAssignmentLHSIsReference.types @@ -17,7 +17,7 @@ x1 += value; >value : any function fn1(x2: number) { ->fn1 : typeof fn1 +>fn1 : (x2: number) => void >x2 : number x2 *= value; @@ -76,7 +76,7 @@ x3['a'] += value; >value : any function fn2(x4: number) { ->fn2 : typeof fn2 +>fn2 : (x4: number) => void >x4 : number (x4) *= value; diff --git a/tests/baselines/reference/conditionalExpressions2.types b/tests/baselines/reference/conditionalExpressions2.types index a85b4889444..7fa483ad348 100644 --- a/tests/baselines/reference/conditionalExpressions2.types +++ b/tests/baselines/reference/conditionalExpressions2.types @@ -38,7 +38,7 @@ var h = [{h:5}, null]; >h : number function i() { if (true) { return { x: 5 }; } else { return null; } } ->i : typeof i +>i : () => { x: number; } >{ x: 5 } : { x: number; } >x : number diff --git a/tests/baselines/reference/conditionalOperatorConditionIsNumberType.types b/tests/baselines/reference/conditionalOperatorConditionIsNumberType.types index 2182a6864c2..3396885509a 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsNumberType.types +++ b/tests/baselines/reference/conditionalOperatorConditionIsNumberType.types @@ -95,7 +95,7 @@ condNumber ? exprIsObject1 : exprIsObject2; //Cond is a number type expression function foo() { return 1 }; ->foo : typeof foo +>foo : () => number var array = [1, 2, 3]; >array : number[] @@ -123,7 +123,7 @@ var array = [1, 2, 3]; foo() ? exprString1 : exprString2; >foo() ? exprString1 : exprString2 : string >foo() : number ->foo : typeof foo +>foo : () => number >exprString1 : string >exprString2 : string @@ -131,7 +131,7 @@ foo() / array[1] ? exprIsObject1 : exprIsObject2; >foo() / array[1] ? exprIsObject1 : exprIsObject2 : Object >foo() / array[1] : number >foo() : number ->foo : typeof foo +>foo : () => number >array[1] : number >array : number[] >exprIsObject1 : Object @@ -230,7 +230,7 @@ var resultIsString3 = foo() ? exprString1 : exprString2; >resultIsString3 : string >foo() ? exprString1 : exprString2 : string >foo() : number ->foo : typeof foo +>foo : () => number >exprString1 : string >exprString2 : string @@ -239,7 +239,7 @@ var resultIsObject3 = foo() / array[1] ? exprIsObject1 : exprIsObject2; >foo() / array[1] ? exprIsObject1 : exprIsObject2 : Object >foo() / array[1] : number >foo() : number ->foo : typeof foo +>foo : () => number >array[1] : number >array : number[] >exprIsObject1 : Object diff --git a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.types b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.types index d72ef94a175..36c15d64c54 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.types +++ b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.types @@ -37,7 +37,7 @@ var exprIsObject2: Object; >Object : Object function foo() { }; ->foo : typeof foo +>foo : () => void class C { static doIt: () => void }; >C : C @@ -126,7 +126,7 @@ condObject ? exprIsObject1 : exprIsObject2; foo() ? exprAny1 : exprAny2; >foo() ? exprAny1 : exprAny2 : any >foo() : void ->foo : typeof foo +>foo : () => void >exprAny1 : any >exprAny2 : any @@ -254,7 +254,7 @@ var resultIsAny3 = foo() ? exprAny1 : exprAny2; >resultIsAny3 : any >foo() ? exprAny1 : exprAny2 : any >foo() : void ->foo : typeof foo +>foo : () => void >exprAny1 : any >exprAny2 : any diff --git a/tests/baselines/reference/conditionalOperatorConditoinIsStringType.types b/tests/baselines/reference/conditionalOperatorConditoinIsStringType.types index dd316991075..668e0fc437c 100644 --- a/tests/baselines/reference/conditionalOperatorConditoinIsStringType.types +++ b/tests/baselines/reference/conditionalOperatorConditoinIsStringType.types @@ -94,7 +94,7 @@ condString ? exprIsObject1 : exprIsObject2; //Cond is a string type expression function foo() { return "string" }; ->foo : typeof foo +>foo : () => string var array = ["1", "2", "3"]; >array : string[] @@ -125,7 +125,7 @@ condString + "string" ? exprNumber1 : exprNumber2; foo() ? exprString1 : exprString2; >foo() ? exprString1 : exprString2 : string >foo() : string ->foo : typeof foo +>foo : () => string >exprString1 : string >exprString2 : string @@ -231,7 +231,7 @@ var resultIsString3 = foo() ? exprString1 : exprString2; >resultIsString3 : string >foo() ? exprString1 : exprString2 : string >foo() : string ->foo : typeof foo +>foo : () => string >exprString1 : string >exprString2 : string diff --git a/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.types b/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.types index 4affab88a68..41981e19b8e 100644 --- a/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.types +++ b/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.types @@ -1,12 +1,12 @@ === tests/cases/compiler/conditionallyDuplicateOverloadsCausedByOverloadResolution.ts === declare function foo(func: (x: string, y: string) => any): boolean; ->foo : typeof foo +>foo : { (func: (x: string, y: string) => any): boolean; (func: (x: string, y: number) => any): string; } >func : (x: string, y: string) => any >x : string >y : string declare function foo(func: (x: string, y: number) => any): string; ->foo : typeof foo +>foo : { (func: (x: string, y: string) => any): boolean; (func: (x: string, y: number) => any): string; } >func : (x: string, y: number) => any >x : string >y : number @@ -14,7 +14,7 @@ declare function foo(func: (x: string, y: number) => any): string; var out = foo((x, y) => { >out : boolean >foo((x, y) => { function bar(a: typeof x): void; function bar(b: typeof y): void; function bar() { } return bar;}) : boolean ->foo : typeof foo +>foo : { (func: (x: string, y: string) => any): boolean; (func: (x: string, y: number) => any): string; } >(x, y) => { function bar(a: typeof x): void; function bar(b: typeof y): void; function bar() { } return bar;} : (x: string, y: string) => { (a: string): void; (b: string): void; } >x : string >y : string @@ -38,13 +38,13 @@ var out = foo((x, y) => { }); declare function foo2(func: (x: string, y: string) => any): boolean; ->foo2 : typeof foo2 +>foo2 : { (func: (x: string, y: string) => any): boolean; (func: (x: string, y: number) => any): string; } >func : (x: string, y: string) => any >x : string >y : string declare function foo2(func: (x: string, y: number) => any): string; ->foo2 : typeof foo2 +>foo2 : { (func: (x: string, y: string) => any): boolean; (func: (x: string, y: number) => any): string; } >func : (x: string, y: number) => any >x : string >y : number @@ -52,7 +52,7 @@ declare function foo2(func: (x: string, y: number) => any): string; var out2 = foo2((x, y) => { >out2 : boolean >foo2((x, y) => { var bar: { (a: typeof x): void; (b: typeof y): void; }; return bar;}) : boolean ->foo2 : typeof foo2 +>foo2 : { (func: (x: string, y: string) => any): boolean; (func: (x: string, y: number) => any): string; } >(x, y) => { var bar: { (a: typeof x): void; (b: typeof y): void; }; return bar;} : (x: string, y: string) => { (a: string): void; (b: string): void; } >x : string >y : string diff --git a/tests/baselines/reference/constantOverloadFunction.types b/tests/baselines/reference/constantOverloadFunction.types index aa2710a8c66..1e74486cb32 100644 --- a/tests/baselines/reference/constantOverloadFunction.types +++ b/tests/baselines/reference/constantOverloadFunction.types @@ -19,27 +19,27 @@ class Derived3 extends Base { biz() { } } >biz : () => void function foo(tagName: 'canvas'): Derived1; ->foo : typeof foo +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } >tagName : 'canvas' >Derived1 : Derived1 function foo(tagName: 'div'): Derived2; ->foo : typeof foo +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } >tagName : 'div' >Derived2 : Derived2 function foo(tagName: 'span'): Derived3; ->foo : typeof foo +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } >tagName : 'span' >Derived3 : Derived3 function foo(tagName: string): Base; ->foo : typeof foo +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } >tagName : string >Base : Base function foo(tagName: any): Base { ->foo : typeof foo +>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; } >tagName : any >Base : Base diff --git a/tests/baselines/reference/constraintPropagationThroughReturnTypes.types b/tests/baselines/reference/constraintPropagationThroughReturnTypes.types index d8a7a5b9991..6f56cca28cc 100644 --- a/tests/baselines/reference/constraintPropagationThroughReturnTypes.types +++ b/tests/baselines/reference/constraintPropagationThroughReturnTypes.types @@ -1,6 +1,6 @@ === tests/cases/compiler/constraintPropagationThroughReturnTypes.ts === function g(x: T): T { ->g : typeof g +>g : (x: T) => T >T : T >x : T >T : T @@ -11,7 +11,7 @@ function g(x: T): T { } function f(x: S) { ->f : typeof f +>f : (x: S) => void >S : S >foo : string >x : S @@ -20,7 +20,7 @@ function f(x: S) { var y = g(x); >y : S >g(x) : S ->g : typeof g +>g : (x: T) => T >x : S y; diff --git a/tests/baselines/reference/constraintSatisfactionWithAny.types b/tests/baselines/reference/constraintSatisfactionWithAny.types index 7e88d4044af..e007d3cec73 100644 --- a/tests/baselines/reference/constraintSatisfactionWithAny.types +++ b/tests/baselines/reference/constraintSatisfactionWithAny.types @@ -2,7 +2,7 @@ // any is not a valid type argument unless there is no constraint, or the constraint is any function foo(x: T): T { return null; } ->foo : typeof foo +>foo : (x: T) => T >T : T >String : String >x : T @@ -10,7 +10,7 @@ function foo(x: T): T { return null; } >T : T function foo2(x: T): T { return null; } ->foo2 : typeof foo2 +>foo2 : (x: T) => T >T : T >x : number >x : T @@ -19,7 +19,7 @@ function foo2(x: T): T { return null; } //function foo3(x: T): T { return null; } function foo4(x: T) => void>(x: T): T { return null; } ->foo4 : typeof foo4 +>foo4 : (x: T) => void>(x: T) => T >T : T >T : T >x : T @@ -33,18 +33,18 @@ var a; foo(a); >foo(a) : any ->foo : typeof foo +>foo : (x: T) => T >a : any foo2(a); >foo2(a) : any ->foo2 : typeof foo2 +>foo2 : (x: T) => T >a : any //foo3(a); foo4(a); >foo4(a) : any ->foo4 : typeof foo4 +>foo4 : (x: T) => void>(x: T) => T >a : any var b: number; @@ -52,18 +52,18 @@ var b: number; foo(b); >foo(b) : any ->foo : typeof foo +>foo : (x: T) => T >b : number foo2(b); >foo2(b) : any ->foo2 : typeof foo2 +>foo2 : (x: T) => T >b : number //foo3(b); foo4(b); >foo4(b) : any ->foo4 : typeof foo4 +>foo4 : (x: T) => void>(x: T) => T >b : number //function foo5(x: T, y: U): T { return null; } diff --git a/tests/baselines/reference/constraintSatisfactionWithEmptyObject.types b/tests/baselines/reference/constraintSatisfactionWithEmptyObject.types index a36b8e5ec65..113736bdd11 100644 --- a/tests/baselines/reference/constraintSatisfactionWithEmptyObject.types +++ b/tests/baselines/reference/constraintSatisfactionWithEmptyObject.types @@ -3,7 +3,7 @@ // Object constraint function foo(x: T) { } ->foo : typeof foo +>foo : (x: T) => void >T : T >Object : Object >x : T @@ -12,7 +12,7 @@ function foo(x: T) { } var r = foo({}); >r : void >foo({}) : void ->foo : typeof foo +>foo : (x: T) => void >{} : {} var a = {}; @@ -22,7 +22,7 @@ var a = {}; var r = foo({}); >r : void >foo({}) : void ->foo : typeof foo +>foo : (x: T) => void >{} : {} class C { @@ -56,7 +56,7 @@ var i: I<{}>; // {} constraint function foo2(x: T) { } ->foo2 : typeof foo2 +>foo2 : (x: T) => void >T : T >x : T >T : T @@ -64,7 +64,7 @@ function foo2(x: T) { } var r = foo2({}); >r : void >foo2({}) : void ->foo2 : typeof foo2 +>foo2 : (x: T) => void >{} : {} var a = {}; @@ -74,7 +74,7 @@ var a = {}; var r = foo2({}); >r : void >foo2({}) : void ->foo2 : typeof foo2 +>foo2 : (x: T) => void >{} : {} class C2 { diff --git a/tests/baselines/reference/constructorArgWithGenericCallSignature.types b/tests/baselines/reference/constructorArgWithGenericCallSignature.types index 339ca301f63..a419f3a3427 100644 --- a/tests/baselines/reference/constructorArgWithGenericCallSignature.types +++ b/tests/baselines/reference/constructorArgWithGenericCallSignature.types @@ -20,7 +20,7 @@ module Test { } export function F(func: MyFunc) { } ->F : typeof F +>F : (func: MyFunc) => void >func : MyFunc >MyFunc : MyFunc } @@ -31,9 +31,9 @@ var func: Test.MyFunc; Test.F(func); // OK >Test.F(func) : void ->Test.F : typeof Test.F +>Test.F : (func: Test.MyFunc) => void >Test : typeof Test ->F : typeof Test.F +>F : (func: Test.MyFunc) => void >func : Test.MyFunc var test = new Test.MyClass(func); // Should be OK diff --git a/tests/baselines/reference/contextualSigInstantiationRestParams.types b/tests/baselines/reference/contextualSigInstantiationRestParams.types index 6dc06be50fc..76a00310fd9 100644 --- a/tests/baselines/reference/contextualSigInstantiationRestParams.types +++ b/tests/baselines/reference/contextualSigInstantiationRestParams.types @@ -1,6 +1,6 @@ === tests/cases/compiler/contextualSigInstantiationRestParams.ts === declare function toInstantiate(a?: A, b?: B): B; ->toInstantiate : typeof toInstantiate +>toInstantiate : (a?: A, b?: B) => B >A : A >B : B >a : A @@ -10,11 +10,11 @@ declare function toInstantiate(a?: A, b?: B): B; >B : B declare function contextual(...s: string[]): string ->contextual : typeof contextual +>contextual : (...s: string[]) => string >s : string[] var sig: typeof contextual = toInstantiate; ->sig : typeof contextual ->contextual : typeof contextual ->toInstantiate : typeof toInstantiate +>sig : (...s: string[]) => string +>contextual : (...s: string[]) => string +>toInstantiate : (a?: A, b?: B) => B diff --git a/tests/baselines/reference/contextualSignatureInstantiation1.types b/tests/baselines/reference/contextualSignatureInstantiation1.types index e181cd47ab3..3a95e87b76f 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation1.types +++ b/tests/baselines/reference/contextualSignatureInstantiation1.types @@ -1,6 +1,6 @@ === tests/cases/compiler/contextualSignatureInstantiation1.ts === declare function map(f: (x: S) => T): (a: S[]) => T[]; ->map : typeof map +>map : (f: (x: S) => T) => (a: S[]) => T[] >S : S >T : T >f : (x: S) => T @@ -25,11 +25,11 @@ var e = (x: string, y?: K) => x.length; var r99 = map(e); // should be {}[] for S since a generic lambda is not inferentially typed >r99 : (a: {}[]) => number[] >map(e) : (a: {}[]) => number[] ->map : typeof map +>map : (f: (x: S) => T) => (a: S[]) => T[] >e : (x: string, y?: K) => number declare function map2(f: (x: S) => T): (a: S[]) => T[]; ->map2 : typeof map2 +>map2 : (f: (x: S) => T) => (a: S[]) => T[] >S : S >length : number >T : T @@ -55,6 +55,6 @@ var e2 = (x: string, y?: K) => x.length; var r100 = map2(e2); // type arg inference should fail for S since a generic lambda is not inferentially typed. Falls back to { length: number } >r100 : (a: { length: number; }[]) => number[] >map2(e2) : (a: { length: number; }[]) => number[] ->map2 : typeof map2 +>map2 : (f: (x: S) => T) => (a: S[]) => T[] >e2 : (x: string, y?: K) => number diff --git a/tests/baselines/reference/contextualSignatureInstantiation3.types b/tests/baselines/reference/contextualSignatureInstantiation3.types index eba0e9aee72..c6ed5a7e97d 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation3.types +++ b/tests/baselines/reference/contextualSignatureInstantiation3.types @@ -1,6 +1,6 @@ === tests/cases/compiler/contextualSignatureInstantiation3.ts === function map(items: T[], f: (x: T) => U): U[]{ ->map : typeof map +>map : (items: T[], f: (x: T) => U) => U[] >T : T >U : U >items : T[] @@ -20,7 +20,7 @@ function map(items: T[], f: (x: T) => U): U[]{ } function identity(x: T) { ->identity : typeof identity +>identity : (x: T) => T >T : T >x : T >T : T @@ -30,7 +30,7 @@ function identity(x: T) { } function singleton(x: T) { ->singleton : typeof singleton +>singleton : (x: T) => T[] >T : T >x : T >T : T @@ -54,14 +54,14 @@ var v1 = xs.map(identity); // Error if not number[] >xs.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >xs : number[] >map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] ->identity : typeof identity +>identity : (x: T) => T var v1 = map(xs, identity); // Error if not number[] >v1 : number[] >map(xs, identity) : number[] ->map : typeof map +>map : (items: T[], f: (x: T) => U) => U[] >xs : number[] ->identity : typeof identity +>identity : (x: T) => T var v2: number[][]; >v2 : number[][] @@ -72,12 +72,12 @@ var v2 = xs.map(singleton); // Error if not number[][] >xs.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >xs : number[] >map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] ->singleton : typeof singleton +>singleton : (x: T) => T[] var v2 = map(xs, singleton); // Error if not number[][] >v2 : number[][] >map(xs, singleton) : number[][] ->map : typeof map +>map : (items: T[], f: (x: T) => U) => U[] >xs : number[] ->singleton : typeof singleton +>singleton : (x: T) => T[] diff --git a/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.types b/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.types index e858596a976..89ea3028d94 100644 --- a/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.types +++ b/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.types @@ -1,6 +1,6 @@ === tests/cases/compiler/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.ts === function f() { ->f : typeof f +>f : () => (u: U) => U >T : T function g(u: U): U { return null } @@ -31,5 +31,5 @@ var x = h("", f()); // Call should succeed and x should be string. All t >h("", f()) : string >h : (v: V, func: (v: V) => W) => W >f() : (u: U) => U ->f : typeof f +>f : () => (u: U) => U diff --git a/tests/baselines/reference/contextualTypeAppliedToVarArgs.types b/tests/baselines/reference/contextualTypeAppliedToVarArgs.types index b6c50514918..cbd16aea35f 100644 --- a/tests/baselines/reference/contextualTypeAppliedToVarArgs.types +++ b/tests/baselines/reference/contextualTypeAppliedToVarArgs.types @@ -1,6 +1,6 @@ === tests/cases/compiler/contextualTypeAppliedToVarArgs.ts === function delegate(instance: any, method: (...args: any[]) => any, data?: any): (...args: any[]) => any { ->delegate : typeof delegate +>delegate : (instance: any, method: (...args: any[]) => any, data?: any) => (...args: any[]) => any >instance : any >method : (...args: any[]) => any >args : any[] @@ -20,7 +20,7 @@ class Foo{ delegate(this, function (source, args2) >delegate(this, function (source, args2) { var a = source.node; var b = args2.node; } ) : (...args: any[]) => any ->delegate : typeof delegate +>delegate : (instance: any, method: (...args: any[]) => any, data?: any) => (...args: any[]) => any >this : Foo >function (source, args2) { var a = source.node; var b = args2.node; } : (source: any, args2: any) => void >source : any diff --git a/tests/baselines/reference/contextualTyping25.types b/tests/baselines/reference/contextualTyping25.types index 9b7b60a8715..3c6442739a2 100644 --- a/tests/baselines/reference/contextualTyping25.types +++ b/tests/baselines/reference/contextualTyping25.types @@ -1,10 +1,10 @@ === tests/cases/compiler/contextualTyping25.ts === function foo(param:{id:number;}){}; foo(<{id:number;}>({})); ->foo : typeof foo +>foo : (param: { id: number; }) => void >param : { id: number; } >id : number >foo(<{id:number;}>({})) : void ->foo : typeof foo +>foo : (param: { id: number; }) => void ><{id:number;}>({}) : { id: number; } >id : number >({}) : {} diff --git a/tests/baselines/reference/contextualTyping26.types b/tests/baselines/reference/contextualTyping26.types index 45363789c20..65a089f6082 100644 --- a/tests/baselines/reference/contextualTyping26.types +++ b/tests/baselines/reference/contextualTyping26.types @@ -1,10 +1,10 @@ === tests/cases/compiler/contextualTyping26.ts === function foo(param:{id:number;}){}; foo(<{id:number;}>({})); ->foo : typeof foo +>foo : (param: { id: number; }) => void >param : { id: number; } >id : number >foo(<{id:number;}>({})) : void ->foo : typeof foo +>foo : (param: { id: number; }) => void ><{id:number;}>({}) : { id: number; } >id : number >({}) : {} diff --git a/tests/baselines/reference/contextualTyping27.types b/tests/baselines/reference/contextualTyping27.types index e74bee5e052..f668565e43d 100644 --- a/tests/baselines/reference/contextualTyping27.types +++ b/tests/baselines/reference/contextualTyping27.types @@ -1,10 +1,10 @@ === tests/cases/compiler/contextualTyping27.ts === function foo(param:{id:number;}){}; foo(<{id:number;}>({})); ->foo : typeof foo +>foo : (param: { id: number; }) => void >param : { id: number; } >id : number >foo(<{id:number;}>({})) : void ->foo : typeof foo +>foo : (param: { id: number; }) => void ><{id:number;}>({}) : { id: number; } >id : number >({}) : {} diff --git a/tests/baselines/reference/contextualTyping28.types b/tests/baselines/reference/contextualTyping28.types index 04ca0651af5..6019fde4a6b 100644 --- a/tests/baselines/reference/contextualTyping28.types +++ b/tests/baselines/reference/contextualTyping28.types @@ -1,8 +1,8 @@ === tests/cases/compiler/contextualTyping28.ts === function foo(param:number[]){}; foo([1]); ->foo : typeof foo +>foo : (param: number[]) => void >param : number[] >foo([1]) : void ->foo : typeof foo +>foo : (param: number[]) => void >[1] : number[] diff --git a/tests/baselines/reference/contextualTyping29.types b/tests/baselines/reference/contextualTyping29.types index a06d296a378..9666e60e959 100644 --- a/tests/baselines/reference/contextualTyping29.types +++ b/tests/baselines/reference/contextualTyping29.types @@ -1,8 +1,8 @@ === tests/cases/compiler/contextualTyping29.ts === function foo(param:number[]){}; foo([1, 3]); ->foo : typeof foo +>foo : (param: number[]) => void >param : number[] >foo([1, 3]) : void ->foo : typeof foo +>foo : (param: number[]) => void >[1, 3] : number[] diff --git a/tests/baselines/reference/contextualTyping31.types b/tests/baselines/reference/contextualTyping31.types index 80511aada95..e37bacd33f3 100644 --- a/tests/baselines/reference/contextualTyping31.types +++ b/tests/baselines/reference/contextualTyping31.types @@ -1,8 +1,8 @@ === tests/cases/compiler/contextualTyping31.ts === function foo(param:number[]){}; foo([1]); ->foo : typeof foo +>foo : (param: number[]) => void >param : number[] >foo([1]) : void ->foo : typeof foo +>foo : (param: number[]) => void >[1] : number[] diff --git a/tests/baselines/reference/contextualTyping32.types b/tests/baselines/reference/contextualTyping32.types index cb8ad24166b..a9d41405b93 100644 --- a/tests/baselines/reference/contextualTyping32.types +++ b/tests/baselines/reference/contextualTyping32.types @@ -1,10 +1,10 @@ === tests/cases/compiler/contextualTyping32.ts === function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return 4}]); ->foo : typeof foo +>foo : (param: { (): number; (i: number): number; }[]) => void >param : { (): number; (i: number): number; }[] >i : number >foo([function(){return 1;}, function(){return 4}]) : void ->foo : typeof foo +>foo : (param: { (): number; (i: number): number; }[]) => void >[function(){return 1;}, function(){return 4}] : { (): number; (i: number): number; }[] >function(){return 1;} : () => number >function(){return 4} : () => number diff --git a/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.types b/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.types index fb24b8c6f2b..0e5c25a9282 100644 --- a/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.types +++ b/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.types @@ -1,6 +1,6 @@ === tests/cases/compiler/contextualTypingTwoInstancesOfSameTypeParameter.ts === function f6(x: (a: T) => T) { ->f6 : typeof f6 +>f6 : (x: (a: T) => T) => any >T : T >x : (a: T) => T >a : T @@ -11,11 +11,11 @@ function f6(x: (a: T) => T) { } f6(x => f6(y => x = y)); >f6(x => f6(y => x = y)) : any ->f6 : typeof f6 +>f6 : (x: (a: T) => T) => any >x => f6(y => x = y) : (x: {}) => any >x : {} >f6(y => x = y) : any ->f6 : typeof f6 +>f6 : (x: (a: T) => T) => any >y => x = y : (y: {}) => {} >y : {} >x = y : {} diff --git a/tests/baselines/reference/convertKeywordsYes.types b/tests/baselines/reference/convertKeywordsYes.types index 75779136160..af2e0766181 100644 --- a/tests/baselines/reference/convertKeywordsYes.types +++ b/tests/baselines/reference/convertKeywordsYes.types @@ -56,7 +56,7 @@ var declare = 0; >declare : number function bigGeneric< ->bigGeneric : typeof bigGeneric +>bigGeneric : (c: constructor, a: any, b2: boolean, i: implements, i2: interface, l: let, m: module, n: number, p: package, p2: private, p3: protected, p4: public, s: set, s2: static, s3: string, g: get, y: yield, d: declare) => void constructor, >constructor : constructor diff --git a/tests/baselines/reference/covariance1.types b/tests/baselines/reference/covariance1.types index d9f39089b1d..d9167095d47 100644 --- a/tests/baselines/reference/covariance1.types +++ b/tests/baselines/reference/covariance1.types @@ -17,7 +17,7 @@ module M { >X : X export function f(y:Y) { } ->f : typeof f +>f : (y: Y) => void >y : Y >Y : Y @@ -27,7 +27,7 @@ module M { f({x:a}); // ok >f({x:a}) : void ->f : typeof f +>f : (y: Y) => void >{x:a} : { x: X; } >x : X >a : X @@ -38,7 +38,7 @@ module M { f({x:b}); // ok covariant subtype >f({x:b}) : void ->f : typeof f +>f : (y: Y) => void >{x:b} : { x: XX; } >x : XX >b : XX diff --git a/tests/baselines/reference/crashInresolveReturnStatement.types b/tests/baselines/reference/crashInresolveReturnStatement.types index d15889cce40..6d31f15569b 100644 --- a/tests/baselines/reference/crashInresolveReturnStatement.types +++ b/tests/baselines/reference/crashInresolveReturnStatement.types @@ -22,7 +22,7 @@ class CreateCopyOfWorkItemDialog { } } function createWorkItemDialog(dialogType: P0) { ->createWorkItemDialog : typeof createWorkItemDialog +>createWorkItemDialog : (dialogType: P0) => void >P0 : P0 >dialogType : P0 >P0 : P0 @@ -35,7 +35,7 @@ class WITDialogs { createWorkItemDialog(CreateCopyOfWorkItemDialog); >createWorkItemDialog(CreateCopyOfWorkItemDialog) : void ->createWorkItemDialog : typeof createWorkItemDialog +>createWorkItemDialog : (dialogType: P0) => void >CreateCopyOfWorkItemDialog : typeof CreateCopyOfWorkItemDialog } } diff --git a/tests/baselines/reference/debugger.types b/tests/baselines/reference/debugger.types index f53af948b67..8d46931bf8f 100644 --- a/tests/baselines/reference/debugger.types +++ b/tests/baselines/reference/debugger.types @@ -2,7 +2,7 @@ debugger; function foo() { ->foo : typeof foo +>foo : () => void debugger; diff --git a/tests/baselines/reference/declFileFunctions.types b/tests/baselines/reference/declFileFunctions.types index 841c47a6ca0..46281813eb0 100644 --- a/tests/baselines/reference/declFileFunctions.types +++ b/tests/baselines/reference/declFileFunctions.types @@ -2,11 +2,11 @@ /** This comment should appear for foo*/ export function foo() { ->foo : typeof foo +>foo : () => void } /** This is comment for function signature*/ export function fooWithParameters(/** this is comment about a*/a: string, ->fooWithParameters : typeof fooWithParameters +>fooWithParameters : (a: string, b: number) => void >a : string /** this is comment for b*/ @@ -18,7 +18,7 @@ export function fooWithParameters(/** this is comment about a*/a: string, >a : string } export function fooWithRestParameters(a: string, ...rests: string[]) { ->fooWithRestParameters : typeof fooWithRestParameters +>fooWithRestParameters : (a: string, ...rests: string[]) => string >a : string >rests : string[] @@ -32,15 +32,15 @@ export function fooWithRestParameters(a: string, ...rests: string[]) { } export function fooWithOverloads(a: string): string; ->fooWithOverloads : typeof fooWithOverloads +>fooWithOverloads : { (a: string): string; (a: number): number; } >a : string export function fooWithOverloads(a: number): number; ->fooWithOverloads : typeof fooWithOverloads +>fooWithOverloads : { (a: string): string; (a: number): number; } >a : number export function fooWithOverloads(a: any): any { ->fooWithOverloads : typeof fooWithOverloads +>fooWithOverloads : { (a: string): string; (a: number): number; } >a : any return a; @@ -49,11 +49,11 @@ export function fooWithOverloads(a: any): any { /** This comment should appear for nonExportedFoo*/ function nonExportedFoo() { ->nonExportedFoo : typeof nonExportedFoo +>nonExportedFoo : () => void } /** This is comment for function signature*/ function nonExportedFooWithParameters(/** this is comment about a*/a: string, ->nonExportedFooWithParameters : typeof nonExportedFooWithParameters +>nonExportedFooWithParameters : (a: string, b: number) => void >a : string /** this is comment for b*/ @@ -65,7 +65,7 @@ function nonExportedFooWithParameters(/** this is comment about a*/a: string, >a : string } function nonExportedFooWithRestParameters(a: string, ...rests: string[]) { ->nonExportedFooWithRestParameters : typeof nonExportedFooWithRestParameters +>nonExportedFooWithRestParameters : (a: string, ...rests: string[]) => string >a : string >rests : string[] @@ -79,15 +79,15 @@ function nonExportedFooWithRestParameters(a: string, ...rests: string[]) { } function nonExportedFooWithOverloads(a: string): string; ->nonExportedFooWithOverloads : typeof nonExportedFooWithOverloads +>nonExportedFooWithOverloads : { (a: string): string; (a: number): number; } >a : string function nonExportedFooWithOverloads(a: number): number; ->nonExportedFooWithOverloads : typeof nonExportedFooWithOverloads +>nonExportedFooWithOverloads : { (a: string): string; (a: number): number; } >a : number function nonExportedFooWithOverloads(a: any): any { ->nonExportedFooWithOverloads : typeof nonExportedFooWithOverloads +>nonExportedFooWithOverloads : { (a: string): string; (a: number): number; } >a : any return a; @@ -97,11 +97,11 @@ function nonExportedFooWithOverloads(a: any): any { === tests/cases/compiler/declFileFunctions_1.ts === /** This comment should appear for foo*/ function globalfoo() { ->globalfoo : typeof globalfoo +>globalfoo : () => void } /** This is comment for function signature*/ function globalfooWithParameters(/** this is comment about a*/a: string, ->globalfooWithParameters : typeof globalfooWithParameters +>globalfooWithParameters : (a: string, b: number) => void >a : string /** this is comment for b*/ @@ -113,7 +113,7 @@ function globalfooWithParameters(/** this is comment about a*/a: string, >a : string } function globalfooWithRestParameters(a: string, ...rests: string[]) { ->globalfooWithRestParameters : typeof globalfooWithRestParameters +>globalfooWithRestParameters : (a: string, ...rests: string[]) => string >a : string >rests : string[] @@ -126,15 +126,15 @@ function globalfooWithRestParameters(a: string, ...rests: string[]) { >join : (separator?: string) => string } function globalfooWithOverloads(a: string): string; ->globalfooWithOverloads : typeof globalfooWithOverloads +>globalfooWithOverloads : { (a: string): string; (a: number): number; } >a : string function globalfooWithOverloads(a: number): number; ->globalfooWithOverloads : typeof globalfooWithOverloads +>globalfooWithOverloads : { (a: string): string; (a: number): number; } >a : number function globalfooWithOverloads(a: any): any { ->globalfooWithOverloads : typeof globalfooWithOverloads +>globalfooWithOverloads : { (a: string): string; (a: number): number; } >a : any return a; diff --git a/tests/baselines/reference/declFileGenericType.types b/tests/baselines/reference/declFileGenericType.types index 6239722b6b5..284ce8f475b 100644 --- a/tests/baselines/reference/declFileGenericType.types +++ b/tests/baselines/reference/declFileGenericType.types @@ -10,7 +10,7 @@ export module C { >B : B export function F(x: T): A { return null; } ->F : typeof F +>F : (x: T) => A >T : T >x : T >T : T @@ -18,7 +18,7 @@ export module C { >B : B export function F2(x: T): C.A { return null; } ->F2 : typeof F2 +>F2 : (x: T) => A >T : T >x : T >T : T @@ -28,7 +28,7 @@ export module C { >B : B export function F3(x: T): C.A[] { return null; } ->F3 : typeof F3 +>F3 : (x: T) => A[] >T : T >x : T >T : T @@ -38,7 +38,7 @@ export module C { >B : B export function F4>(x: T): Array> { return null; } ->F4 : typeof F4 +>F4 : >(x: T) => A[] >T : T >A : A >B : B @@ -51,12 +51,12 @@ export module C { >B : B export function F5(): T { return null; } ->F5 : typeof F5 +>F5 : () => T >T : T >T : T export function F6>(x: T): T { return null; } ->F6 : typeof F6 +>F6 : >(x: T) => T >T : T >A : A >B : B @@ -83,28 +83,28 @@ export var a: C.A; >B : C.B export var b = C.F; ->b : typeof C.F ->C.F : typeof C.F +>b : (x: T) => C.A +>C.F : (x: T) => C.A >C : typeof C ->F : typeof C.F +>F : (x: T) => C.A export var c = C.F2; ->c : typeof C.F2 ->C.F2 : typeof C.F2 +>c : (x: T) => C.A +>C.F2 : (x: T) => C.A >C : typeof C ->F2 : typeof C.F2 +>F2 : (x: T) => C.A export var d = C.F3; ->d : typeof C.F3 ->C.F3 : typeof C.F3 +>d : (x: T) => C.A[] +>C.F3 : (x: T) => C.A[] >C : typeof C ->F3 : typeof C.F3 +>F3 : (x: T) => C.A[] export var e = C.F4; ->e : typeof C.F4 ->C.F4 : typeof C.F4 +>e : >(x: T) => C.A[] +>C.F4 : >(x: T) => C.A[] >C : typeof C ->F4 : typeof C.F4 +>F4 : >(x: T) => C.A[] export var x = (new C.D>(new C.A())).val; >x : C.A @@ -127,7 +127,7 @@ export var x = (new C.D>(new C.A())).val; >val : C.A export function f>() { } ->f : typeof f +>f : >() => void >T : T >C : unknown >A : C.A @@ -137,9 +137,9 @@ export function f>() { } export var g = C.F5>(); >g : C.A >C.F5>() : C.A ->C.F5 : typeof C.F5 +>C.F5 : () => T >C : typeof C ->F5 : typeof C.F5 +>F5 : () => T >C : unknown >A : C.A >C : unknown @@ -160,8 +160,8 @@ export interface i extends C.A { } >B : C.B export var j = C.F6; ->j : typeof C.F6 ->C.F6 : typeof C.F6 +>j : >(x: T) => T +>C.F6 : >(x: T) => T >C : typeof C ->F6 : typeof C.F6 +>F6 : >(x: T) => T diff --git a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.types b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.types index 41f709491d0..ecb7c002089 100644 --- a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.types +++ b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.types @@ -1,26 +1,26 @@ === tests/cases/compiler/declFileRestParametersOfFunctionAndFunctionType.ts === function f1(...args) { } ->f1 : typeof f1 +>f1 : (...args: any[]) => void >args : any[] function f2(x: (...args) => void) { } ->f2 : typeof f2 +>f2 : (x: (...args: any[]) => void) => void >x : (...args: any[]) => void >args : any[] function f3(x: { (...args): void }) { } ->f3 : typeof f3 +>f3 : (x: (...args: any[]) => void) => void >x : (...args: any[]) => void >args : any[] function f4 void>() { } ->f4 : typeof f4 +>f4 : void>() => void >T : T >args : any[] function f5() { } ->f5 : typeof f5 +>f5 : void>() => void >T : T >args : any[] diff --git a/tests/baselines/reference/declFileTypeofFunction.types b/tests/baselines/reference/declFileTypeofFunction.types index 0a2dae318e9..4f913b2c184 100644 --- a/tests/baselines/reference/declFileTypeofFunction.types +++ b/tests/baselines/reference/declFileTypeofFunction.types @@ -1,31 +1,31 @@ === tests/cases/compiler/declFileTypeofFunction.ts === function f(n: typeof f): string; ->f : typeof f ->n : typeof f ->f : typeof f +>f : { (n: typeof f): string; (n: { (n: typeof g): number; (n: typeof f): number; }): string; } +>n : { (n: typeof f): string; (n: { (n: typeof g): number; (n: typeof f): number; }): string; } +>f : { (n: typeof f): string; (n: { (n: typeof g): number; (n: typeof f): number; }): string; } function f(n: typeof g): string; ->f : typeof f ->n : typeof g ->g : typeof g +>f : { (n: typeof f): string; (n: { (n: typeof g): number; (n: typeof f): number; }): string; } +>n : { (n: typeof g): number; (n: { (n: typeof f): string; (n: typeof g): string; }): number; } +>g : { (n: typeof g): number; (n: { (n: typeof f): string; (n: typeof g): string; }): number; } function f() { return undefined; } ->f : typeof f +>f : { (n: typeof f): string; (n: { (n: typeof g): number; (n: typeof f): number; }): string; } >undefined : undefined function g(n: typeof g): number; ->g : typeof g ->n : typeof g ->g : typeof g +>g : { (n: typeof g): number; (n: { (n: typeof f): string; (n: typeof g): string; }): number; } +>n : { (n: typeof g): number; (n: { (n: typeof f): string; (n: typeof g): string; }): number; } +>g : { (n: typeof g): number; (n: { (n: typeof f): string; (n: typeof g): string; }): number; } function g(n: typeof f): number; ->g : typeof g ->n : typeof f ->f : typeof f +>g : { (n: typeof g): number; (n: { (n: typeof f): string; (n: typeof g): string; }): number; } +>n : { (n: typeof f): string; (n: { (n: typeof g): number; (n: typeof f): number; }): string; } +>f : { (n: typeof f): string; (n: { (n: typeof g): number; (n: typeof f): number; }): string; } function g() { return undefined; } ->g : typeof g +>g : { (n: typeof g): number; (n: { (n: typeof f): string; (n: typeof g): string; }): number; } >undefined : undefined var b: () => typeof b; @@ -33,25 +33,25 @@ var b: () => typeof b; >b : any function b1() { ->b1 : typeof b1 +>b1 : () => typeof b1 return b1; ->b1 : typeof b1 +>b1 : () => typeof b1 } function foo(): typeof foo { ->foo : typeof foo ->foo : typeof foo +>foo : () => typeof foo +>foo : () => typeof foo return null; } var foo1: typeof foo; ->foo1 : typeof foo ->foo : typeof foo +>foo1 : () => typeof foo +>foo : () => typeof foo var foo2 = foo; ->foo2 : typeof foo ->foo : typeof foo +>foo2 : () => typeof foo +>foo : () => typeof foo var foo3 = function () { >foo3 : any @@ -69,7 +69,7 @@ var x = () => { } function foo5(x: number) { ->foo5 : typeof foo5 +>foo5 : (x: number) => (x: number) => number >x : number function bar(x: number) { diff --git a/tests/baselines/reference/declarationEmit_nameConflicts.types b/tests/baselines/reference/declarationEmit_nameConflicts.types index fe6a5c29565..f07a7fbb2ab 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts.types +++ b/tests/baselines/reference/declarationEmit_nameConflicts.types @@ -6,7 +6,7 @@ export module M { >M : typeof M export function f() { } ->f : typeof f +>f : () => void export class C { } >C : C @@ -15,16 +15,16 @@ export module M { >N : typeof N export function g() { }; ->g : typeof g +>g : () => void export interface I { } >I : I } export import a = M.f; ->a : typeof f +>a : () => void >M : typeof M ->f : typeof f +>f : () => void export import b = M.C; >b : typeof C @@ -45,7 +45,7 @@ export module M.P { >P : typeof P export function f() { } ->f : typeof f +>f : () => void export class C { } >C : C @@ -54,22 +54,22 @@ export module M.P { >N : typeof N export function g() { }; ->g : typeof g +>g : () => void export interface I { } >I : I } export import im = M.P.f; ->im : typeof f +>im : () => void >M : typeof M >P : typeof P ->f : typeof f +>f : () => void export var a = M.a; // emitted incorrectly as typeof f ->a : typeof M.f ->M.a : typeof M.f +>a : () => void +>M.a : () => void >M : typeof M ->a : typeof M.f +>a : () => void export var b = M.b; // ok >b : typeof M.C @@ -84,12 +84,12 @@ export module M.P { >c : typeof M.N export var g = M.c.g; // ok ->g : typeof M.c.g ->M.c.g : typeof M.c.g +>g : () => void +>M.c.g : () => void >M.c : typeof M.N >M : typeof M >c : typeof M.N ->g : typeof M.c.g +>g : () => void export var d = M.d; // emitted incorrectly as typeof im >d : typeof M.d @@ -103,7 +103,7 @@ export module M.Q { >Q : typeof Q export function f() { } ->f : typeof f +>f : () => void export class C { } >C : C @@ -112,7 +112,7 @@ export module M.Q { >N : typeof N export function g() { }; ->g : typeof g +>g : () => void export interface I { } >I : I diff --git a/tests/baselines/reference/declarationEmit_nameConflicts2.types b/tests/baselines/reference/declarationEmit_nameConflicts2.types index 258ea9596e8..026cfed0989 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts2.types +++ b/tests/baselines/reference/declarationEmit_nameConflicts2.types @@ -5,7 +5,7 @@ module X.Y.base { >base : typeof base export function f() { } ->f : typeof f +>f : () => void export class C { } >C : C @@ -27,14 +27,14 @@ module X.Y.base.Z { >Z : typeof Z export var f = X.Y.base.f; // Should be base.f ->f : typeof base.f ->X.Y.base.f : typeof base.f +>f : () => void +>X.Y.base.f : () => void >X.Y.base : typeof base >X.Y : typeof Y >X : typeof X >Y : typeof Y >base : typeof base ->f : typeof base.f +>f : () => void export var C = X.Y.base.C; // Should be base.C >C : typeof base.C diff --git a/tests/baselines/reference/declarationEmit_nameConflicts3.types b/tests/baselines/reference/declarationEmit_nameConflicts3.types index d4b4934b2d1..50fd6ecdd1b 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts3.types +++ b/tests/baselines/reference/declarationEmit_nameConflicts3.types @@ -9,19 +9,19 @@ module M { >D : typeof D export function f() { } ->f : typeof f +>f : () => void } export module C { >C : typeof C export function f() { } ->f : typeof f +>f : () => void } export module E { >E : typeof E export function f() { } ->f : typeof f +>f : () => void } } @@ -51,26 +51,26 @@ module M.P { >D : M.D export var w = M.D.f; // error, should be typeof M.D.f ->w : typeof M.D.f ->M.D.f : typeof M.D.f +>w : () => void +>M.D.f : () => void >M.D : typeof M.D >M : typeof M >D : typeof M.D ->f : typeof M.D.f +>f : () => void export var x = M.C.f; // error, should be typeof M.C.f ->x : typeof M.C.f ->M.C.f : typeof M.C.f +>x : () => void +>M.C.f : () => void >M.C : typeof M.C >M : typeof M >C : typeof M.C ->f : typeof M.C.f +>f : () => void export var x = M.E.f; // error, should be typeof M.E.f ->x : typeof M.C.f ->M.E.f : typeof M.E.f +>x : () => void +>M.E.f : () => void >M.E : typeof M.E >M : typeof M >E : typeof M.E ->f : typeof M.E.f +>f : () => void } diff --git a/tests/baselines/reference/deleteOperatorWithBooleanType.types b/tests/baselines/reference/deleteOperatorWithBooleanType.types index 93cc9971d11..fa8c375b0a5 100644 --- a/tests/baselines/reference/deleteOperatorWithBooleanType.types +++ b/tests/baselines/reference/deleteOperatorWithBooleanType.types @@ -4,7 +4,7 @@ var BOOLEAN: boolean; >BOOLEAN : boolean function foo(): boolean { return true; } ->foo : typeof foo +>foo : () => boolean class A { >A : A @@ -64,7 +64,7 @@ var ResultIsBoolean6 = delete foo(); >ResultIsBoolean6 : boolean >delete foo() : boolean >foo() : boolean ->foo : typeof foo +>foo : () => boolean var ResultIsBoolean7 = delete A.foo(); >ResultIsBoolean7 : boolean @@ -92,7 +92,7 @@ delete BOOLEAN; delete foo(); >delete foo() : boolean >foo() : boolean ->foo : typeof foo +>foo : () => boolean delete true, false; >delete true, false : boolean diff --git a/tests/baselines/reference/deleteOperatorWithNumberType.types b/tests/baselines/reference/deleteOperatorWithNumberType.types index f2301e698e0..542efe04c34 100644 --- a/tests/baselines/reference/deleteOperatorWithNumberType.types +++ b/tests/baselines/reference/deleteOperatorWithNumberType.types @@ -8,7 +8,7 @@ var NUMBER1: number[] = [1, 2]; >[1, 2] : number[] function foo(): number { return 1; } ->foo : typeof foo +>foo : () => number class A { >A : A @@ -89,7 +89,7 @@ var ResultIsBoolean9 = delete foo(); >ResultIsBoolean9 : boolean >delete foo() : boolean >foo() : number ->foo : typeof foo +>foo : () => number var ResultIsBoolean10 = delete A.foo(); >ResultIsBoolean10 : boolean @@ -139,7 +139,7 @@ delete NUMBER1; delete foo(); >delete foo() : boolean >foo() : number ->foo : typeof foo +>foo : () => number delete objA.a; >delete objA.a : boolean diff --git a/tests/baselines/reference/deleteOperatorWithStringType.types b/tests/baselines/reference/deleteOperatorWithStringType.types index 869d5b24be5..f86afc39c49 100644 --- a/tests/baselines/reference/deleteOperatorWithStringType.types +++ b/tests/baselines/reference/deleteOperatorWithStringType.types @@ -8,7 +8,7 @@ var STRING1: string[] = ["", "abc"]; >["", "abc"] : string[] function foo(): string { return "abc"; } ->foo : typeof foo +>foo : () => string class A { >A : A @@ -89,7 +89,7 @@ var ResultIsBoolean9 = delete foo(); >ResultIsBoolean9 : boolean >delete foo() : boolean >foo() : string ->foo : typeof foo +>foo : () => string var ResultIsBoolean10 = delete A.foo(); >ResultIsBoolean10 : boolean @@ -147,7 +147,7 @@ delete STRING1; delete foo(); >delete foo() : boolean >foo() : string ->foo : typeof foo +>foo : () => string delete objA.a,M.n; >delete objA.a,M.n : string diff --git a/tests/baselines/reference/dottedSymbolResolution1.types b/tests/baselines/reference/dottedSymbolResolution1.types index 11c52d494bb..776b9704e73 100644 --- a/tests/baselines/reference/dottedSymbolResolution1.types +++ b/tests/baselines/reference/dottedSymbolResolution1.types @@ -26,14 +26,14 @@ class Base { foo() { } } >foo : () => void function each(collection: string, callback: (indexInArray: any, valueOfElement: any) => any): any; ->each : typeof each +>each : { (collection: string, callback: (indexInArray: any, valueOfElement: any) => any): any; (collection: JQuery, callback: (indexInArray: number, valueOfElement: Base) => any): any; } >collection : string >callback : (indexInArray: any, valueOfElement: any) => any >indexInArray : any >valueOfElement : any function each(collection: JQuery, callback: (indexInArray: number, valueOfElement: Base) => any): any; ->each : typeof each +>each : { (collection: string, callback: (indexInArray: any, valueOfElement: any) => any): any; (collection: JQuery, callback: (indexInArray: number, valueOfElement: Base) => any): any; } >collection : JQuery >JQuery : JQuery >callback : (indexInArray: number, valueOfElement: Base) => any @@ -42,7 +42,7 @@ function each(collection: JQuery, callback: (indexInArray: number, valueOfElemen >Base : Base function each(collection: any, callback: (indexInArray: any, valueOfElement: any) => any): any { ->each : typeof each +>each : { (collection: string, callback: (indexInArray: any, valueOfElement: any) => any): any; (collection: JQuery, callback: (indexInArray: number, valueOfElement: Base) => any): any; } >collection : any >callback : (indexInArray: any, valueOfElement: any) => any >indexInArray : any @@ -52,7 +52,7 @@ function each(collection: any, callback: (indexInArray: any, valueOfElement: any } function _setBarAndText(): void { ->_setBarAndText : typeof _setBarAndText +>_setBarAndText : () => void var x: JQuery, $: JQueryStatic >x : JQuery @@ -62,7 +62,7 @@ function _setBarAndText(): void { each(x.find(" "), function () { >each(x.find(" "), function () { var $this: JQuery = $(''), thisBar = $this.find(".fx-usagebars-calloutbar-this"); // bug lead to 'could not find dotted symbol' here } ) : any ->each : typeof each +>each : { (collection: string, callback: (indexInArray: any, valueOfElement: any) => any): any; (collection: JQuery, callback: (indexInArray: number, valueOfElement: Base) => any): any; } >x.find(" ") : JQuery >x.find : (selector: string) => JQuery >x : JQuery diff --git a/tests/baselines/reference/duplicateVariablesByScope.types b/tests/baselines/reference/duplicateVariablesByScope.types index add12599a83..ec20d665ad8 100644 --- a/tests/baselines/reference/duplicateVariablesByScope.types +++ b/tests/baselines/reference/duplicateVariablesByScope.types @@ -22,7 +22,7 @@ module M { } function foo() { ->foo : typeof foo +>foo : () => void var x = 2; >x : number diff --git a/tests/baselines/reference/es6ClassTest8.types b/tests/baselines/reference/es6ClassTest8.types index 5d554708103..e5133c88d7e 100644 --- a/tests/baselines/reference/es6ClassTest8.types +++ b/tests/baselines/reference/es6ClassTest8.types @@ -1,6 +1,6 @@ === tests/cases/compiler/es6ClassTest8.ts === function f1(x:any) {return x;} ->f1 : typeof f1 +>f1 : (x: any) => any >x : any >x : any @@ -20,9 +20,9 @@ class C { var b = f1(f1(bar)); >b : any >f1(f1(bar)) : any ->f1 : typeof f1 +>f1 : (x: any) => any >f1(bar) : any ->f1 : typeof f1 +>f1 : (x: any) => any >bar : any } diff --git a/tests/baselines/reference/everyTypeAssignableToAny.types b/tests/baselines/reference/everyTypeAssignableToAny.types index 850a906ff9a..89af4f4b7c0 100644 --- a/tests/baselines/reference/everyTypeAssignableToAny.types +++ b/tests/baselines/reference/everyTypeAssignableToAny.types @@ -180,7 +180,7 @@ a = ae; >ae : E function foo(x: T, y: U, z: V) { ->foo : typeof foo +>foo : (x: T, y: U, z: V) => void >T : T >U : U >V : V diff --git a/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.types b/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.types index 7cca0148fce..54dcc67b78a 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.types +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.types @@ -35,7 +35,7 @@ class D{ } function F(x: string): number { return 42; } ->F : typeof F +>F : (x: string) => number >x : string module M { @@ -49,7 +49,7 @@ module M { } export function F2(x: number): string { return x.toString(); } ->F2 : typeof F2 +>F2 : (x: number) => string >x : number >x.toString() : string >x.toString : (radix?: number) => string @@ -117,18 +117,18 @@ var anOtherObjectLiteral: { id: number } = new C(); >C : typeof C var aFunction: typeof F = F; ->aFunction : typeof F ->F : typeof F ->F : typeof F +>aFunction : (x: string) => number +>F : (x: string) => number +>F : (x: string) => number var anOtherFunction: (x: string) => number = F; >anOtherFunction : (x: string) => number >x : string ->F : typeof F +>F : (x: string) => number var aLambda: typeof F = (x) => 2; ->aLambda : typeof F ->F : typeof F +>aLambda : (x: string) => number +>F : (x: string) => number >(x) => 2 : (x: string) => number >x : string @@ -147,9 +147,9 @@ var aClassInModule: M.A = new M.A(); >A : typeof M.A var aFunctionInModule: typeof M.F2 = (x) => 'this is a string'; ->aFunctionInModule : typeof M.F2 +>aFunctionInModule : (x: number) => string >M : typeof M ->F2 : typeof M.F2 +>F2 : (x: number) => string >(x) => 'this is a string' : (x: number) => string >x : number diff --git a/tests/baselines/reference/everyTypeWithInitializer.types b/tests/baselines/reference/everyTypeWithInitializer.types index 825656fbfea..3ebe8368f35 100644 --- a/tests/baselines/reference/everyTypeWithInitializer.types +++ b/tests/baselines/reference/everyTypeWithInitializer.types @@ -35,7 +35,7 @@ class D{ } function F(x: string): number { return 42; } ->F : typeof F +>F : (x: string) => number >x : string module M { @@ -49,7 +49,7 @@ module M { } export function F2(x: number): string { return x.toString(); } ->F2 : typeof F2 +>F2 : (x: number) => string >x : number >x.toString() : string >x.toString : (radix?: number) => string @@ -103,8 +103,8 @@ var anObjectLiteral = { id: 12 }; >id : number var aFunction = F; ->aFunction : typeof F ->F : typeof F +>aFunction : (x: string) => number +>F : (x: string) => number var aLambda = (x) => 2; >aLambda : (x: any) => number @@ -123,10 +123,10 @@ var aClassInModule = new M.A(); >A : typeof M.A var aFunctionInModule = M.F2; ->aFunctionInModule : typeof M.F2 ->M.F2 : typeof M.F2 +>aFunctionInModule : (x: number) => string +>M.F2 : (x: number) => string >M : typeof M ->F2 : typeof M.F2 +>F2 : (x: number) => string // no initializer or annotation, so this is an 'any' var x; diff --git a/tests/baselines/reference/exportAssignmentFunction.types b/tests/baselines/reference/exportAssignmentFunction.types index e1748f8b891..023a8c234d2 100644 --- a/tests/baselines/reference/exportAssignmentFunction.types +++ b/tests/baselines/reference/exportAssignmentFunction.types @@ -1,16 +1,16 @@ === tests/cases/compiler/exportAssignmentFunction_B.ts === import fooFunc = require("exportAssignmentFunction_A"); ->fooFunc : typeof fooFunc +>fooFunc : () => number var n: number = fooFunc(); >n : number >fooFunc() : number ->fooFunc : typeof fooFunc +>fooFunc : () => number === tests/cases/compiler/exportAssignmentFunction_A.ts === function foo() { return 0; } ->foo : typeof foo +>foo : () => number export = foo; ->foo : typeof foo +>foo : () => number diff --git a/tests/baselines/reference/exportAssignmentMergedModule.types b/tests/baselines/reference/exportAssignmentMergedModule.types index 333cfdd9a93..d72f173a439 100644 --- a/tests/baselines/reference/exportAssignmentMergedModule.types +++ b/tests/baselines/reference/exportAssignmentMergedModule.types @@ -5,9 +5,9 @@ import foo = require("./foo_0"); var a: number = foo.a(); >a : number >foo.a() : number ->foo.a : typeof foo.a +>foo.a : () => number >foo : typeof foo ->a : typeof foo.a +>a : () => number if(!!foo.b){ >!!foo.b : boolean @@ -24,16 +24,16 @@ if(!!foo.b){ >Test : typeof foo.Test >answer : number >foo.c(42) : number ->foo.c : typeof foo.c +>foo.c : (a: number) => number >foo : typeof foo ->c : typeof foo.c +>c : (a: number) => number } === tests/cases/conformance/externalModules/foo_0.ts === module Foo { >Foo : typeof Foo export function a(){ ->a : typeof a +>a : () => number return 5; } @@ -44,7 +44,7 @@ module Foo { >Foo : typeof Foo export function c(a: number){ ->c : typeof c +>c : (a: number) => number >a : number return a; diff --git a/tests/baselines/reference/exportCodeGen.types b/tests/baselines/reference/exportCodeGen.types index 348d8f9c46f..89cb16fdf4c 100644 --- a/tests/baselines/reference/exportCodeGen.types +++ b/tests/baselines/reference/exportCodeGen.types @@ -9,7 +9,7 @@ module A { >x : number function lt12() { ->lt12 : typeof lt12 +>lt12 : () => boolean return x < 12; >x < 12 : boolean @@ -25,7 +25,7 @@ module B { >x : number function lt12() { ->lt12 : typeof lt12 +>lt12 : () => boolean return x < 12; >x < 12 : boolean @@ -38,7 +38,7 @@ module C { >C : typeof C function no() { ->no : typeof no +>no : () => boolean return false; } @@ -49,7 +49,7 @@ module D { >D : typeof D export function yes() { ->yes : typeof yes +>yes : () => boolean return true; } @@ -64,7 +64,7 @@ module E { >Red : Color export function fn() { } ->fn : typeof fn +>fn : () => void export interface I { id: number } >I : I @@ -92,7 +92,7 @@ module F { >Red : Color function fn() { } ->fn : typeof fn +>fn : () => void interface I { id: number } >I : I diff --git a/tests/baselines/reference/exportImport.types b/tests/baselines/reference/exportImport.types index 88a9aded86f..9899103d779 100644 --- a/tests/baselines/reference/exportImport.types +++ b/tests/baselines/reference/exportImport.types @@ -3,7 +3,7 @@ import e = require('./exporter'); >e : typeof e export function w(): e.w { // Should be OK ->w : typeof w +>w : () => e.w >e : unknown >w : e.w diff --git a/tests/baselines/reference/exportImportMultipleFiles.types b/tests/baselines/reference/exportImportMultipleFiles.types index 368f857950b..adafcef2dba 100644 --- a/tests/baselines/reference/exportImportMultipleFiles.types +++ b/tests/baselines/reference/exportImportMultipleFiles.types @@ -4,15 +4,15 @@ import lib = require('./exportImportMultipleFiles_library'); lib.math.add(3, 4); // Shouldnt be error >lib.math.add(3, 4) : any ->lib.math.add : typeof lib.math.add +>lib.math.add : (a: any, b: any) => any >lib.math : typeof lib.math >lib : typeof lib >math : typeof lib.math ->add : typeof lib.math.add +>add : (a: any, b: any) => any === tests/cases/compiler/exportImportMultipleFiles_math.ts === export function add(a, b) { return a + b; } ->add : typeof add +>add : (a: any, b: any) => any >a : any >b : any >a + b : any @@ -25,7 +25,7 @@ export import math = require("exportImportMultipleFiles_math"); math.add(3, 4); // OK >math.add(3, 4) : any ->math.add : typeof math.add +>math.add : (a: any, b: any) => any >math : typeof math ->add : typeof math.add +>add : (a: any, b: any) => any diff --git a/tests/baselines/reference/exportImportNonInstantiatedModule2.types b/tests/baselines/reference/exportImportNonInstantiatedModule2.types index 958f48bec9d..c11eac715a9 100644 --- a/tests/baselines/reference/exportImportNonInstantiatedModule2.types +++ b/tests/baselines/reference/exportImportNonInstantiatedModule2.types @@ -3,7 +3,7 @@ import e = require('./exporter'); >e : typeof e export function w(): e.w { // Should be OK ->w : typeof w +>w : () => e.w >e : unknown >w : e.w diff --git a/tests/baselines/reference/exportVisibility.types b/tests/baselines/reference/exportVisibility.types index c972bd0e5d6..59936828275 100644 --- a/tests/baselines/reference/exportVisibility.types +++ b/tests/baselines/reference/exportVisibility.types @@ -9,7 +9,7 @@ export var foo = new Foo(); >Foo : typeof Foo export function test(foo: Foo) { ->test : typeof test +>test : (foo: Foo) => boolean >foo : Foo >Foo : Foo diff --git a/tests/baselines/reference/externFunc.types b/tests/baselines/reference/externFunc.types index 2ba2886873d..5aac52ac125 100644 --- a/tests/baselines/reference/externFunc.types +++ b/tests/baselines/reference/externFunc.types @@ -1,9 +1,9 @@ === tests/cases/compiler/externFunc.ts === declare function parseInt(s:string):number; ->parseInt : typeof parseInt +>parseInt : { (s: string, radix?: number): number; (s: string): number; } >s : string parseInt("2"); >parseInt("2") : number ->parseInt : typeof parseInt +>parseInt : { (s: string, radix?: number): number; (s: string): number; } diff --git a/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.types b/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.types index 4a20abec68b..bb49781d477 100644 --- a/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.types +++ b/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.types @@ -4,11 +4,11 @@ export import file1 = require('externalModuleReferenceOfImportDeclarationWithExp file1.foo(); >file1.foo() : void ->file1.foo : typeof file1.foo +>file1.foo : () => void >file1 : typeof file1 ->foo : typeof file1.foo +>foo : () => void === tests/cases/compiler/externalModuleReferenceOfImportDeclarationWithExportModifier_0.ts === export function foo() { }; ->foo : typeof foo +>foo : () => void diff --git a/tests/baselines/reference/fatarrowfunctions.types b/tests/baselines/reference/fatarrowfunctions.types index 0ac210f1b4e..1b819b8496a 100644 --- a/tests/baselines/reference/fatarrowfunctions.types +++ b/tests/baselines/reference/fatarrowfunctions.types @@ -1,7 +1,7 @@ === tests/cases/compiler/fatarrowfunctions.ts === function foo(x:any) { ->foo : typeof foo +>foo : (x: any) => any >x : any return x(); @@ -12,7 +12,7 @@ function foo(x:any) { foo((x:number,y,z)=>{return x+y+z;}); >foo((x:number,y,z)=>{return x+y+z;}) : any ->foo : typeof foo +>foo : (x: any) => any >(x:number,y,z)=>{return x+y+z;} : (x: number, y: any, z: any) => any >x : number >y : any @@ -25,7 +25,7 @@ foo((x:number,y,z)=>{return x+y+z;}); foo((x,y,z)=>{return x+y+z;}); >foo((x,y,z)=>{return x+y+z;}) : any ->foo : typeof foo +>foo : (x: any) => any >(x,y,z)=>{return x+y+z;} : (x: any, y: any, z: any) => any >x : any >y : any @@ -38,7 +38,7 @@ foo((x,y,z)=>{return x+y+z;}); foo((x,y:number,z)=>{return x+y+z;}); >foo((x,y:number,z)=>{return x+y+z;}) : any ->foo : typeof foo +>foo : (x: any) => any >(x,y:number,z)=>{return x+y+z;} : (x: any, y: number, z: any) => any >x : any >y : number @@ -51,7 +51,7 @@ foo((x,y:number,z)=>{return x+y+z;}); foo((x,y:number,z:number)=>{return x+y+z;}); >foo((x,y:number,z:number)=>{return x+y+z;}) : any ->foo : typeof foo +>foo : (x: any) => any >(x,y:number,z:number)=>{return x+y+z;} : (x: any, y: number, z: number) => any >x : any >y : number @@ -64,7 +64,7 @@ foo((x,y:number,z:number)=>{return x+y+z;}); foo((x,y,z:number)=>{return x+y+z;}); >foo((x,y,z:number)=>{return x+y+z;}) : any ->foo : typeof foo +>foo : (x: any) => any >(x,y,z:number)=>{return x+y+z;} : (x: any, y: any, z: number) => any >x : any >y : any @@ -77,12 +77,12 @@ foo((x,y,z:number)=>{return x+y+z;}); foo(()=>{return 0;}); >foo(()=>{return 0;}) : any ->foo : typeof foo +>foo : (x: any) => any >()=>{return 0;} : () => number foo((x:number,y,z)=>x+y+z); >foo((x:number,y,z)=>x+y+z) : any ->foo : typeof foo +>foo : (x: any) => any >(x:number,y,z)=>x+y+z : (x: number, y: any, z: any) => any >x : number >y : any @@ -95,7 +95,7 @@ foo((x:number,y,z)=>x+y+z); foo((x,y,z)=>x+y+z); >foo((x,y,z)=>x+y+z) : any ->foo : typeof foo +>foo : (x: any) => any >(x,y,z)=>x+y+z : (x: any, y: any, z: any) => any >x : any >y : any @@ -108,7 +108,7 @@ foo((x,y,z)=>x+y+z); foo((x,y:number,z)=>{return x+y+z;}); >foo((x,y:number,z)=>{return x+y+z;}) : any ->foo : typeof foo +>foo : (x: any) => any >(x,y:number,z)=>{return x+y+z;} : (x: any, y: number, z: any) => any >x : any >y : number @@ -121,7 +121,7 @@ foo((x,y:number,z)=>{return x+y+z;}); foo((x,y:number,z:number)=>{return x+y+z;}); >foo((x,y:number,z:number)=>{return x+y+z;}) : any ->foo : typeof foo +>foo : (x: any) => any >(x,y:number,z:number)=>{return x+y+z;} : (x: any, y: number, z: number) => any >x : any >y : number @@ -134,7 +134,7 @@ foo((x,y:number,z:number)=>{return x+y+z;}); foo((x,y,z:number)=>{return x+y+z;}); >foo((x,y,z:number)=>{return x+y+z;}) : any ->foo : typeof foo +>foo : (x: any) => any >(x,y,z:number)=>{return x+y+z;} : (x: any, y: any, z: number) => any >x : any >y : any @@ -147,13 +147,13 @@ foo((x,y,z:number)=>{return x+y+z;}); foo(()=>{return 0;}); >foo(()=>{return 0;}) : any ->foo : typeof foo +>foo : (x: any) => any >()=>{return 0;} : () => number foo(((x) => x)); >foo(((x) => x)) : any ->foo : typeof foo +>foo : (x: any) => any >((x) => x) : (x: any) => any >(x) => x : (x: any) => any >x : any @@ -161,7 +161,7 @@ foo(((x) => x)); foo(x => x*x); >foo(x => x*x) : any ->foo : typeof foo +>foo : (x: any) => any >x => x*x : (x: any) => number >x : any >x*x : number @@ -189,7 +189,7 @@ var w = () => 3; >() => 3 : () => number function ternaryTest(isWhile:boolean) { ->ternaryTest : typeof ternaryTest +>ternaryTest : (isWhile: boolean) => void >isWhile : boolean var f = isWhile ? function (n) { return n > 0; } : function (n) { return n === 0; }; @@ -208,7 +208,7 @@ function ternaryTest(isWhile:boolean) { } declare function setTimeout(expression: any, msec?: number, language?: any): number; ->setTimeout : typeof setTimeout +>setTimeout : (expression: any, msec?: number, language?: any) => number >expression : any >msec : number >language : any @@ -226,7 +226,7 @@ var messenger = { setTimeout(() => { this.message.toString(); }, 3000); >setTimeout(() => { this.message.toString(); }, 3000) : number ->setTimeout : typeof setTimeout +>setTimeout : (expression: any, msec?: number, language?: any) => number >() => { this.message.toString(); } : () => void >this.message.toString() : any >this.message.toString : any diff --git a/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.types b/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.types index 57cfb46b109..cf561eb08af 100644 --- a/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.types +++ b/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.types @@ -1,6 +1,6 @@ === tests/cases/compiler/fatarrowfunctionsInFunctionParameterDefaults.ts === function fn(x = () => this, y = x()) { ->fn : typeof fn +>fn : (x?: () => any, y?: any) => any >x : () => any >() => this : () => any >this : any @@ -17,6 +17,6 @@ function fn(x = () => this, y = x()) { fn.call(4); // Should be 4 >fn.call(4) : any >fn.call : (thisArg: any, ...argArray: any[]) => any ->fn : typeof fn +>fn : (x?: () => any, y?: any) => any >call : (thisArg: any, ...argArray: any[]) => any diff --git a/tests/baselines/reference/fatarrowfunctionsInFunctions.types b/tests/baselines/reference/fatarrowfunctionsInFunctions.types index 7a91fa42d6f..a8633eb1a8c 100644 --- a/tests/baselines/reference/fatarrowfunctionsInFunctions.types +++ b/tests/baselines/reference/fatarrowfunctionsInFunctions.types @@ -1,6 +1,6 @@ === tests/cases/compiler/fatarrowfunctionsInFunctions.ts === declare function setTimeout(expression: any, msec?: number, language?: any): number; ->setTimeout : typeof setTimeout +>setTimeout : (expression: any, msec?: number, language?: any) => number >expression : any >msec : number >language : any @@ -22,7 +22,7 @@ var messenger = { setTimeout(function() { >setTimeout(function() { _self.message.toString(); }, 3000) : number ->setTimeout : typeof setTimeout +>setTimeout : (expression: any, msec?: number, language?: any) => number >function() { _self.message.toString(); } : () => void _self.message.toString(); diff --git a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.types b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.types index d3781874b56..95214571df9 100644 --- a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.types +++ b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.types @@ -1,6 +1,6 @@ === tests/cases/compiler/fixTypeParameterInSignatureWithRestParameters.ts === function bar(item1: T, item2: T) { } ->bar : typeof bar +>bar : (item1: T, item2: T) => void >T : T >item1 : T >T : T @@ -9,5 +9,5 @@ function bar(item1: T, item2: T) { } bar(1, ""); // Should be ok >bar(1, "") : void ->bar : typeof bar +>bar : (item1: T, item2: T) => void diff --git a/tests/baselines/reference/forInStatement3.types b/tests/baselines/reference/forInStatement3.types index e98730e48b9..1d3803065bd 100644 --- a/tests/baselines/reference/forInStatement3.types +++ b/tests/baselines/reference/forInStatement3.types @@ -1,6 +1,6 @@ === tests/cases/compiler/forInStatement3.ts === function F() { ->F : typeof F +>F : () => void >T : T var expr: T; diff --git a/tests/baselines/reference/forStatements.types b/tests/baselines/reference/forStatements.types index a13add7c4a5..fad702213df 100644 --- a/tests/baselines/reference/forStatements.types +++ b/tests/baselines/reference/forStatements.types @@ -35,7 +35,7 @@ class D{ } function F(x: string): number { return 42; } ->F : typeof F +>F : (x: string) => number >x : string module M { @@ -49,7 +49,7 @@ module M { } export function F2(x: number): string { return x.toString(); } ->F2 : typeof F2 +>F2 : (x: number) => string >x : number >x.toString() : string >x.toString : (radix?: number) => string @@ -117,18 +117,18 @@ for(var anOtherObjectLiteral: { id: number } = new C();;){} >C : typeof C for(var aFunction: typeof F = F;;){} ->aFunction : typeof F ->F : typeof F ->F : typeof F +>aFunction : (x: string) => number +>F : (x: string) => number +>F : (x: string) => number for(var anOtherFunction: (x: string) => number = F;;){} >anOtherFunction : (x: string) => number >x : string ->F : typeof F +>F : (x: string) => number for(var aLambda: typeof F = (x) => 2;;){} ->aLambda : typeof F ->F : typeof F +>aLambda : (x: string) => number +>F : (x: string) => number >(x) => 2 : (x: string) => number >x : string @@ -147,9 +147,9 @@ for(var aClassInModule: M.A = new M.A();;){} >A : typeof M.A for(var aFunctionInModule: typeof M.F2 = (x) => 'this is a string';;){} ->aFunctionInModule : typeof M.F2 +>aFunctionInModule : (x: number) => string >M : typeof M ->F2 : typeof M.F2 +>F2 : (x: number) => string >(x) => 'this is a string' : (x: number) => string >x : number diff --git a/tests/baselines/reference/forStatementsMultipleValidDecl.types b/tests/baselines/reference/forStatementsMultipleValidDecl.types index f5401754e29..f894eef1404 100644 --- a/tests/baselines/reference/forStatementsMultipleValidDecl.types +++ b/tests/baselines/reference/forStatementsMultipleValidDecl.types @@ -14,7 +14,7 @@ for (var x = undefined; ;) { } // new declaration space, making redeclaring x as a string valid function declSpace() { ->declSpace : typeof declSpace +>declSpace : () => void for (var x = 'this is a string'; ;) { } >x : string diff --git a/tests/baselines/reference/funcdecl.types b/tests/baselines/reference/funcdecl.types index c208e51c450..bbfd14bd220 100644 --- a/tests/baselines/reference/funcdecl.types +++ b/tests/baselines/reference/funcdecl.types @@ -1,42 +1,42 @@ === tests/cases/compiler/funcdecl.ts === function simpleFunc() { ->simpleFunc : typeof simpleFunc +>simpleFunc : () => string return "this is my simple func"; } var simpleFuncVar = simpleFunc; ->simpleFuncVar : typeof simpleFunc ->simpleFunc : typeof simpleFunc +>simpleFuncVar : () => string +>simpleFunc : () => string function anotherFuncNoReturn() { ->anotherFuncNoReturn : typeof anotherFuncNoReturn +>anotherFuncNoReturn : () => void } var anotherFuncNoReturnVar = anotherFuncNoReturn; ->anotherFuncNoReturnVar : typeof anotherFuncNoReturn ->anotherFuncNoReturn : typeof anotherFuncNoReturn +>anotherFuncNoReturnVar : () => void +>anotherFuncNoReturn : () => void function withReturn() : string{ ->withReturn : typeof withReturn +>withReturn : () => string return "Hello"; } var withReturnVar = withReturn; ->withReturnVar : typeof withReturn ->withReturn : typeof withReturn +>withReturnVar : () => string +>withReturn : () => string function withParams(a : string) : string{ ->withParams : typeof withParams +>withParams : (a: string) => string >a : string return a; >a : string } var withparamsVar = withParams; ->withparamsVar : typeof withParams ->withParams : typeof withParams +>withparamsVar : (a: string) => string +>withParams : (a: string) => string function withMultiParams(a : number, b, c: Object) { ->withMultiParams : typeof withMultiParams +>withMultiParams : (a: number, b: any, c: Object) => number >a : number >b : any >c : Object @@ -46,39 +46,39 @@ function withMultiParams(a : number, b, c: Object) { >a : number } var withMultiParamsVar = withMultiParams; ->withMultiParamsVar : typeof withMultiParams ->withMultiParams : typeof withMultiParams +>withMultiParamsVar : (a: number, b: any, c: Object) => number +>withMultiParams : (a: number, b: any, c: Object) => number function withOptionalParams(a?: string) { ->withOptionalParams : typeof withOptionalParams +>withOptionalParams : (a?: string) => void >a : string } var withOptionalParamsVar = withOptionalParams; ->withOptionalParamsVar : typeof withOptionalParams ->withOptionalParams : typeof withOptionalParams +>withOptionalParamsVar : (a?: string) => void +>withOptionalParams : (a?: string) => void function withInitializedParams(a: string, b0, b = 30, c = "string value") { ->withInitializedParams : typeof withInitializedParams +>withInitializedParams : (a: string, b0: any, b?: number, c?: string) => void >a : string >b0 : any >b : number >c : string } var withInitializedParamsVar = withInitializedParams; ->withInitializedParamsVar : typeof withInitializedParams ->withInitializedParams : typeof withInitializedParams +>withInitializedParamsVar : (a: string, b0: any, b?: number, c?: string) => void +>withInitializedParams : (a: string, b0: any, b?: number, c?: string) => void function withOptionalInitializedParams(a: string, c: string = "hello string") { ->withOptionalInitializedParams : typeof withOptionalInitializedParams +>withOptionalInitializedParams : (a: string, c?: string) => void >a : string >c : string } var withOptionalInitializedParamsVar = withOptionalInitializedParams; ->withOptionalInitializedParamsVar : typeof withOptionalInitializedParams ->withOptionalInitializedParams : typeof withOptionalInitializedParams +>withOptionalInitializedParamsVar : (a: string, c?: string) => void +>withOptionalInitializedParams : (a: string, c?: string) => void function withRestParams(a: string, ... myRestParameter : number[]) { ->withRestParams : typeof withRestParams +>withRestParams : (a: string, ...myRestParameter: number[]) => number[] >a : string >myRestParameter : number[] @@ -86,19 +86,19 @@ function withRestParams(a: string, ... myRestParameter : number[]) { >myRestParameter : number[] } var withRestParamsVar = withRestParams; ->withRestParamsVar : typeof withRestParams ->withRestParams : typeof withRestParams +>withRestParamsVar : (a: string, ...myRestParameter: number[]) => number[] +>withRestParams : (a: string, ...myRestParameter: number[]) => number[] function overload1(n: number) : string; ->overload1 : typeof overload1 +>overload1 : { (n: number): string; (s: string): string; } >n : number function overload1(s: string) : string; ->overload1 : typeof overload1 +>overload1 : { (n: number): string; (s: string): string; } >s : string function overload1(ns: any) { ->overload1 : typeof overload1 +>overload1 : { (n: number): string; (s: string): string; } >ns : any return ns.toString(); @@ -108,18 +108,18 @@ function overload1(ns: any) { >toString : any } var withOverloadSignature = overload1; ->withOverloadSignature : typeof overload1 ->overload1 : typeof overload1 +>withOverloadSignature : { (n: number): string; (s: string): string; } +>overload1 : { (n: number): string; (s: string): string; } function f(n: () => void) { } ->f : typeof f +>f : (n: () => void) => void >n : () => void module m2 { >m2 : typeof m2 export function foo(n: () => void ) { ->foo : typeof foo +>foo : (n: () => void) => void >n : () => void } @@ -127,9 +127,9 @@ module m2 { m2.foo(() => { >m2.foo(() => { var b = 30; return b;}) : void ->m2.foo : typeof m2.foo +>m2.foo : (n: () => void) => void >m2 : typeof m2 ->foo : typeof m2.foo +>foo : (n: () => void) => void >() => { var b = 30; return b;} : () => number var b = 30; @@ -142,15 +142,15 @@ m2.foo(() => { declare function fooAmbient(n: number): string; ->fooAmbient : typeof fooAmbient +>fooAmbient : (n: number) => string >n : number declare function overloadAmbient(n: number): string; ->overloadAmbient : typeof overloadAmbient +>overloadAmbient : { (n: number): string; (s: string): string; } >n : number declare function overloadAmbient(s: string): string; ->overloadAmbient : typeof overloadAmbient +>overloadAmbient : { (n: number): string; (s: string): string; } >s : string var f2 = () => { diff --git a/tests/baselines/reference/functionCall1.types b/tests/baselines/reference/functionCall1.types index fbd17de66c7..1b06379860c 100644 --- a/tests/baselines/reference/functionCall1.types +++ b/tests/baselines/reference/functionCall1.types @@ -1,9 +1,9 @@ === tests/cases/compiler/functionCall1.ts === function foo():any{return ""}; ->foo : typeof foo +>foo : () => any var x = foo(); >x : any >foo() : any ->foo : typeof foo +>foo : () => any diff --git a/tests/baselines/reference/functionCall2.types b/tests/baselines/reference/functionCall2.types index a40eefe5bb7..92bb0f0be23 100644 --- a/tests/baselines/reference/functionCall2.types +++ b/tests/baselines/reference/functionCall2.types @@ -1,9 +1,9 @@ === tests/cases/compiler/functionCall2.ts === function foo():number{return 1}; ->foo : typeof foo +>foo : () => number var x = foo(); >x : number >foo() : number ->foo : typeof foo +>foo : () => number diff --git a/tests/baselines/reference/functionCall3.types b/tests/baselines/reference/functionCall3.types index 242ac83fed1..a9b8e46069c 100644 --- a/tests/baselines/reference/functionCall3.types +++ b/tests/baselines/reference/functionCall3.types @@ -1,10 +1,10 @@ === tests/cases/compiler/functionCall3.ts === function foo():any[]{return [1];} ->foo : typeof foo +>foo : () => any[] >[1] : any[] var x = foo(); >x : any[] >foo() : any[] ->foo : typeof foo +>foo : () => any[] diff --git a/tests/baselines/reference/functionCall4.types b/tests/baselines/reference/functionCall4.types index 0a51873350b..37a0b980a00 100644 --- a/tests/baselines/reference/functionCall4.types +++ b/tests/baselines/reference/functionCall4.types @@ -1,13 +1,13 @@ === tests/cases/compiler/functionCall4.ts === function foo():any{return ""}; ->foo : typeof foo +>foo : () => any function bar():()=>any{return foo}; ->bar : typeof bar ->foo : typeof foo +>bar : () => () => any +>foo : () => any var x = bar(); >x : () => any >bar() : () => any ->bar : typeof bar +>bar : () => () => any diff --git a/tests/baselines/reference/functionCall5.types b/tests/baselines/reference/functionCall5.types index 9ac37cf0fad..e5578ef3c34 100644 --- a/tests/baselines/reference/functionCall5.types +++ b/tests/baselines/reference/functionCall5.types @@ -5,7 +5,7 @@ module m1 { export class c1 { public a; }} >a : any function foo():m1.c1{return new m1.c1();}; ->foo : typeof foo +>foo : () => m1.c1 >m1 : unknown >c1 : m1.c1 >new m1.c1() : m1.c1 @@ -16,5 +16,5 @@ function foo():m1.c1{return new m1.c1();}; var x = foo(); >x : m1.c1 >foo() : m1.c1 ->foo : typeof foo +>foo : () => m1.c1 diff --git a/tests/baselines/reference/functionConstraintSatisfaction.types b/tests/baselines/reference/functionConstraintSatisfaction.types index 56ebbe1fb01..70200af6fa9 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction.types +++ b/tests/baselines/reference/functionConstraintSatisfaction.types @@ -2,7 +2,7 @@ // satisfaction of a constraint to Function, no errors expected function foo(x: T): T { return x; } ->foo : typeof foo +>foo : (x: T) => T >T : T >Function : Function >x : T @@ -39,14 +39,14 @@ var c: { (): string; (x): string }; var r = foo(new Function()); >r : Function >foo(new Function()) : Function ->foo : typeof foo +>foo : (x: T) => T >new Function() : Function >Function : { (...args: string[]): Function; new (...args: string[]): Function; prototype: Function; } var r1 = foo((x) => x); >r1 : (x: any) => any >foo((x) => x) : (x: any) => any ->foo : typeof foo +>foo : (x: T) => T >(x) => x : (x: any) => any >x : any >x : any @@ -54,7 +54,7 @@ var r1 = foo((x) => x); var r2 = foo((x: string[]) => x); >r2 : (x: string[]) => string[] >foo((x: string[]) => x) : (x: string[]) => string[] ->foo : typeof foo +>foo : (x: T) => T >(x: string[]) => x : (x: string[]) => string[] >x : string[] >x : string[] @@ -62,7 +62,7 @@ var r2 = foo((x: string[]) => x); var r3 = foo(function (x) { return x }); >r3 : (x: any) => any >foo(function (x) { return x }) : (x: any) => any ->foo : typeof foo +>foo : (x: T) => T >function (x) { return x } : (x: any) => any >x : any >x : any @@ -70,7 +70,7 @@ var r3 = foo(function (x) { return x }); var r4 = foo(function (x: string[]) { return x }); >r4 : (x: string[]) => string[] >foo(function (x: string[]) { return x }) : (x: string[]) => string[] ->foo : typeof foo +>foo : (x: T) => T >function (x: string[]) { return x } : (x: string[]) => string[] >x : string[] >x : string[] @@ -78,25 +78,25 @@ var r4 = foo(function (x: string[]) { return x }); var r5 = foo(i); >r5 : I >foo(i) : I ->foo : typeof foo +>foo : (x: T) => T >i : I var r6 = foo(C); >r6 : typeof C >foo(C) : typeof C ->foo : typeof foo +>foo : (x: T) => T >C : typeof C var r7 = foo(b); >r7 : new () => string >foo(b) : new () => string ->foo : typeof foo +>foo : (x: T) => T >b : new () => string var r8 = foo(c); >r8 : { (): string; (x: any): string; } >foo(c) : { (): string; (x: any): string; } ->foo : typeof foo +>foo : (x: T) => T >c : { (): string; (x: any): string; } interface I2 { @@ -151,7 +151,7 @@ var c2: { (x: T): T; (x: T, y: T): T }; var r9 = foo((x: U) => x); >r9 : (x: U) => U >foo((x: U) => x) : (x: U) => U ->foo : typeof foo +>foo : (x: T) => T >(x: U) => x : (x: U) => U >U : U >x : U @@ -161,7 +161,7 @@ var r9 = foo((x: U) => x); var r10 = foo(function (x: U) { return x; }); >r10 : (x: U) => U >foo(function (x: U) { return x; }) : (x: U) => U ->foo : typeof foo +>foo : (x: T) => T >function (x: U) { return x; } : (x: U) => U >U : U >x : U @@ -171,7 +171,7 @@ var r10 = foo(function (x: U) { return x; }); var r11 = foo((x: U) => x); >r11 : (x: U) => U >foo((x: U) => x) : (x: U) => U ->foo : typeof foo +>foo : (x: T) => T >(x: U) => x : (x: U) => U >U : U >Date : Date @@ -182,7 +182,7 @@ var r11 = foo((x: U) => x); var r12 = foo((x: U, y: V) => x); >r12 : (x: U, y: V) => U >foo((x: U, y: V) => x) : (x: U, y: V) => U ->foo : typeof foo +>foo : (x: T) => T >(x: U, y: V) => x : (x: U, y: V) => U >U : U >V : V @@ -195,25 +195,25 @@ var r12 = foo((x: U, y: V) => x); var r13 = foo(i2); >r13 : I2 >foo(i2) : I2 ->foo : typeof foo +>foo : (x: T) => T >i2 : I2 var r14 = foo(C2); >r14 : typeof C2 >foo(C2) : typeof C2 ->foo : typeof foo +>foo : (x: T) => T >C2 : typeof C2 var r15 = foo(b2); >r15 : new (x: T) => T >foo(b2) : new (x: T) => T ->foo : typeof foo +>foo : (x: T) => T >b2 : new (x: T) => T var r16 = foo(c2); >r16 : { (x: T): T; (x: T, y: T): T; } >foo(c2) : { (x: T): T; (x: T, y: T): T; } ->foo : typeof foo +>foo : (x: T) => T >c2 : { (x: T): T; (x: T, y: T): T; } interface F2 extends Function { foo: string; } @@ -228,11 +228,11 @@ var f2: F2; var r17 = foo(f2); >r17 : F2 >foo(f2) : F2 ->foo : typeof foo +>foo : (x: T) => T >f2 : F2 function foo2(x: T, y: U) { ->foo2 : typeof foo2 +>foo2 : void, U extends () => void>(x: T, y: U) => void >T : T >U : U >x : T @@ -242,12 +242,12 @@ function foo2(x: T, y: U) { foo(x); >foo(x) : T ->foo : typeof foo +>foo : (x: T) => T >x : T foo(y); >foo(y) : U ->foo : typeof foo +>foo : (x: T) => T >y : U } //function foo2(x: T, y: U) { diff --git a/tests/baselines/reference/functionConstraintSatisfaction3.types b/tests/baselines/reference/functionConstraintSatisfaction3.types index f260cc568da..04963c36519 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction3.types +++ b/tests/baselines/reference/functionConstraintSatisfaction3.types @@ -2,7 +2,7 @@ // satisfaction of a constraint to Function, no errors expected function foo string>(x: T): T { return x; } ->foo : typeof foo +>foo : string>(x: T) => T >T : T >x : string >x : T @@ -39,7 +39,7 @@ var c: { (): string; (x): string }; var r1 = foo((x) => x); >r1 : (x: any) => any >foo((x) => x) : (x: any) => any ->foo : typeof foo +>foo : string>(x: T) => T >(x) => x : (x: any) => any >x : any >x : any @@ -47,7 +47,7 @@ var r1 = foo((x) => x); var r2 = foo((x: string) => x); >r2 : (x: string) => string >foo((x: string) => x) : (x: string) => string ->foo : typeof foo +>foo : string>(x: T) => T >(x: string) => x : (x: string) => string >x : string >x : string @@ -55,7 +55,7 @@ var r2 = foo((x: string) => x); var r3 = foo(function (x) { return x }); >r3 : (x: any) => any >foo(function (x) { return x }) : (x: any) => any ->foo : typeof foo +>foo : string>(x: T) => T >function (x) { return x } : (x: any) => any >x : any >x : any @@ -63,7 +63,7 @@ var r3 = foo(function (x) { return x }); var r4 = foo(function (x: string) { return x }); >r4 : (x: string) => string >foo(function (x: string) { return x }) : (x: string) => string ->foo : typeof foo +>foo : string>(x: T) => T >function (x: string) { return x } : (x: string) => string >x : string >x : string @@ -71,13 +71,13 @@ var r4 = foo(function (x: string) { return x }); var r5 = foo(i); >r5 : I >foo(i) : I ->foo : typeof foo +>foo : string>(x: T) => T >i : I var r8 = foo(c); >r8 : { (): string; (x: any): string; } >foo(c) : { (): string; (x: any): string; } ->foo : typeof foo +>foo : string>(x: T) => T >c : { (): string; (x: any): string; } interface I2 { @@ -132,7 +132,7 @@ var c2: { (x: T): T; (x: T, y: T): T }; var r9 = foo(function (x: U) { return x; }); >r9 : (x: U) => U >foo(function (x: U) { return x; }) : (x: U) => U ->foo : typeof foo +>foo : string>(x: T) => T >function (x: U) { return x; } : (x: U) => U >U : U >x : U @@ -142,7 +142,7 @@ var r9 = foo(function (x: U) { return x; }); var r10 = foo((x: U) => x); >r10 : (x: U) => U >foo((x: U) => x) : (x: U) => U ->foo : typeof foo +>foo : string>(x: T) => T >(x: U) => x : (x: U) => U >U : U >x : U @@ -152,12 +152,12 @@ var r10 = foo((x: U) => x); var r12 = foo(i2); >r12 : I2 >foo(i2) : I2 ->foo : typeof foo +>foo : string>(x: T) => T >i2 : I2 var r15 = foo(c2); >r15 : { (x: T): T; (x: T, y: T): T; } >foo(c2) : { (x: T): T; (x: T, y: T): T; } ->foo : typeof foo +>foo : string>(x: T) => T >c2 : { (x: T): T; (x: T, y: T): T; } diff --git a/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.types b/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.types index fefa0168edb..af751fbb0e9 100644 --- a/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.types +++ b/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.types @@ -1,6 +1,6 @@ === tests/cases/compiler/functionDeclarationWithArgumentOfTypeFunctionTypeArray.ts === function foo(args: { (x): number }[]) { ->foo : typeof foo +>foo : (args: { (x: any): number; }[]) => number >args : { (x: any): number; }[] >x : any diff --git a/tests/baselines/reference/functionImplementations.types b/tests/baselines/reference/functionImplementations.types index eeb3cb02a5c..fe03fa58d98 100644 --- a/tests/baselines/reference/functionImplementations.types +++ b/tests/baselines/reference/functionImplementations.types @@ -43,43 +43,43 @@ var a: any = function f() { // Two mutually recursive function implementations with no return type annotations function rec1() { ->rec1 : typeof rec1 +>rec1 : () => any return rec2(); >rec2() : any ->rec2 : typeof rec2 +>rec2 : () => any } function rec2() { ->rec2 : typeof rec2 +>rec2 : () => any return rec1(); >rec1() : any ->rec1 : typeof rec1 +>rec1 : () => any } var a = rec1(); >a : any >rec1() : any ->rec1 : typeof rec1 +>rec1 : () => any var a = rec2(); >a : any >rec2() : any ->rec2 : typeof rec2 +>rec2 : () => any // Two mutually recursive function implementations with return type annotation in one function rec3(): number { ->rec3 : typeof rec3 +>rec3 : () => number return rec4(); >rec4() : number ->rec4 : typeof rec4 +>rec4 : () => number } function rec4() { ->rec4 : typeof rec4 +>rec4 : () => number return rec3(); >rec3() : number ->rec3 : typeof rec3 +>rec3 : () => number } var n: number; >n : number @@ -87,12 +87,12 @@ var n: number; var n = rec3(); >n : number >rec3() : number ->rec3 : typeof rec3 +>rec3 : () => number var n = rec4(); >n : number >rec4() : number ->rec4 : typeof rec4 +>rec4 : () => number // FunctionExpression with no return type annotation and returns a number var n = function () { @@ -225,7 +225,7 @@ undefined === function (): number { // Type of 'this' in function implementation is 'any' function thisFunc() { ->thisFunc : typeof thisFunc +>thisFunc : () => void var x = this; >x : any @@ -237,7 +237,7 @@ function thisFunc() { // Function signature with optional parameter, no type annotation and initializer has initializer's type function opt1(n = 4) { ->opt1 : typeof opt1 +>opt1 : (n?: number) => void >n : number var m = n; @@ -250,7 +250,7 @@ function opt1(n = 4) { // Function signature with optional parameter, no type annotation and initializer has initializer's widened type function opt2(n = { x: null, y: undefined }) { ->opt2 : typeof opt2 +>opt2 : (n?: { x: any; y: any; }) => void >n : { x: any; y: any; } >{ x: null, y: undefined } : { x: null; y: undefined; } >x : any @@ -269,7 +269,7 @@ function opt2(n = { x: null, y: undefined }) { // Function signature with initializer referencing other parameter to the left function opt3(n: number, m = n) { ->opt3 : typeof opt3 +>opt3 : (n: number, m?: number) => void >n : number >m : number >n : number @@ -287,7 +287,7 @@ function opt3(n: number, m = n) { // FunctionExpression with non -void return type annotation return with no expression function f6(): number { ->f6 : typeof f6 +>f6 : () => number return; } diff --git a/tests/baselines/reference/functionMergedWithModule.types b/tests/baselines/reference/functionMergedWithModule.types index e472584c5a4..d0c711ab39a 100644 --- a/tests/baselines/reference/functionMergedWithModule.types +++ b/tests/baselines/reference/functionMergedWithModule.types @@ -12,7 +12,7 @@ module foo.Bar { >Bar : typeof Bar export function f() { ->f : typeof f +>f : () => void } } @@ -21,12 +21,12 @@ module foo.Baz { >Baz : typeof Baz export function g() { ->g : typeof g +>g : () => void Bar.f(); >Bar.f() : void ->Bar.f : typeof Bar.f +>Bar.f : () => void >Bar : typeof Bar ->f : typeof Bar.f +>f : () => void } } diff --git a/tests/baselines/reference/functionOnlyHasThrow.types b/tests/baselines/reference/functionOnlyHasThrow.types index 33237c3c78a..0f76f4be39d 100644 --- a/tests/baselines/reference/functionOnlyHasThrow.types +++ b/tests/baselines/reference/functionOnlyHasThrow.types @@ -1,6 +1,6 @@ === tests/cases/compiler/functionOnlyHasThrow.ts === function clone():number { ->clone : typeof clone +>clone : () => number throw new Error("To be implemented"); >new Error("To be implemented") : Error diff --git a/tests/baselines/reference/functionOverloads10.types b/tests/baselines/reference/functionOverloads10.types index 8637862a87e..8ec2bc7c589 100644 --- a/tests/baselines/reference/functionOverloads10.types +++ b/tests/baselines/reference/functionOverloads10.types @@ -1,14 +1,14 @@ === tests/cases/compiler/functionOverloads10.ts === function foo(foo:string, bar:number); ->foo : typeof foo +>foo : { (foo: string, bar: number): any; (foo: string): any; } >foo : string >bar : number function foo(foo:string); ->foo : typeof foo +>foo : { (foo: string, bar: number): any; (foo: string): any; } >foo : string function foo(foo:any){ } ->foo : typeof foo +>foo : { (foo: string, bar: number): any; (foo: string): any; } >foo : any diff --git a/tests/baselines/reference/functionOverloads12.types b/tests/baselines/reference/functionOverloads12.types index 2b46367ecbb..6e4c2d9189e 100644 --- a/tests/baselines/reference/functionOverloads12.types +++ b/tests/baselines/reference/functionOverloads12.types @@ -1,10 +1,10 @@ === tests/cases/compiler/functionOverloads12.ts === function foo():string; ->foo : typeof foo +>foo : { (): string; (): number; } function foo():number; ->foo : typeof foo +>foo : { (): string; (): number; } function foo():any { if (true) return ""; else return 0;} ->foo : typeof foo +>foo : { (): string; (): number; } diff --git a/tests/baselines/reference/functionOverloads13.types b/tests/baselines/reference/functionOverloads13.types index 438a3008e9b..ee65bc296e7 100644 --- a/tests/baselines/reference/functionOverloads13.types +++ b/tests/baselines/reference/functionOverloads13.types @@ -1,13 +1,13 @@ === tests/cases/compiler/functionOverloads13.ts === function foo(bar:number):string; ->foo : typeof foo +>foo : { (bar: number): string; (bar: number): number; } >bar : number function foo(bar:number):number; ->foo : typeof foo +>foo : { (bar: number): string; (bar: number): number; } >bar : number function foo(bar?:number):any { return "" } ->foo : typeof foo +>foo : { (bar: number): string; (bar: number): number; } >bar : number diff --git a/tests/baselines/reference/functionOverloads14.types b/tests/baselines/reference/functionOverloads14.types index 60c8a44e996..562c43965c7 100644 --- a/tests/baselines/reference/functionOverloads14.types +++ b/tests/baselines/reference/functionOverloads14.types @@ -1,14 +1,14 @@ === tests/cases/compiler/functionOverloads14.ts === function foo():{a:number;} ->foo : typeof foo +>foo : { (): { a: number; }; (): { a: string; }; } >a : number function foo():{a:string;} ->foo : typeof foo +>foo : { (): { a: number; }; (): { a: string; }; } >a : string function foo():{a:any;} { return {a:1} } ->foo : typeof foo +>foo : { (): { a: number; }; (): { a: string; }; } >a : any >{a:1} : { a: number; } >a : number diff --git a/tests/baselines/reference/functionOverloads15.types b/tests/baselines/reference/functionOverloads15.types index ab5b25fb369..6ca5b6709cb 100644 --- a/tests/baselines/reference/functionOverloads15.types +++ b/tests/baselines/reference/functionOverloads15.types @@ -1,18 +1,18 @@ === tests/cases/compiler/functionOverloads15.ts === function foo(foo:{a:string; b:number;}):string; ->foo : typeof foo +>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; } >foo : { a: string; b: number; } >a : string >b : number function foo(foo:{a:string; b:number;}):number; ->foo : typeof foo +>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; } >foo : { a: string; b: number; } >a : string >b : number function foo(foo:{a:string; b?:number;}):any { return "" } ->foo : typeof foo +>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; } >foo : { a: string; b?: number; } >a : string >b : number diff --git a/tests/baselines/reference/functionOverloads16.types b/tests/baselines/reference/functionOverloads16.types index ae3d08d6479..6974d0dab98 100644 --- a/tests/baselines/reference/functionOverloads16.types +++ b/tests/baselines/reference/functionOverloads16.types @@ -1,16 +1,16 @@ === tests/cases/compiler/functionOverloads16.ts === function foo(foo:{a:string;}):string; ->foo : typeof foo +>foo : { (foo: { a: string; }): string; (foo: { a: string; }): number; } >foo : { a: string; } >a : string function foo(foo:{a:string;}):number; ->foo : typeof foo +>foo : { (foo: { a: string; }): string; (foo: { a: string; }): number; } >foo : { a: string; } >a : string function foo(foo:{a:string; b?:number;}):any { return "" } ->foo : typeof foo +>foo : { (foo: { a: string; }): string; (foo: { a: string; }): number; } >foo : { a: string; b?: number; } >a : string >b : number diff --git a/tests/baselines/reference/functionOverloads21.types b/tests/baselines/reference/functionOverloads21.types index e3a8be004d5..dc9e28b7b57 100644 --- a/tests/baselines/reference/functionOverloads21.types +++ b/tests/baselines/reference/functionOverloads21.types @@ -1,17 +1,17 @@ === tests/cases/compiler/functionOverloads21.ts === function foo(bar:{a:number;}[]); ->foo : typeof foo +>foo : { (bar: { a: number; }[]): any; (bar: { a: number; b: string; }[]): any; } >bar : { a: number; }[] >a : number function foo(bar:{a:number; b:string;}[]); ->foo : typeof foo +>foo : { (bar: { a: number; }[]): any; (bar: { a: number; b: string; }[]): any; } >bar : { a: number; b: string; }[] >a : number >b : string function foo(bar:{a:any; b?:string;}[]) { return 0 } ->foo : typeof foo +>foo : { (bar: { a: number; }[]): any; (bar: { a: number; b: string; }[]): any; } >bar : { a: any; b?: string; }[] >a : any >b : string diff --git a/tests/baselines/reference/functionOverloads23.types b/tests/baselines/reference/functionOverloads23.types index 4bdbc646fcf..40b67a78c55 100644 --- a/tests/baselines/reference/functionOverloads23.types +++ b/tests/baselines/reference/functionOverloads23.types @@ -1,16 +1,16 @@ === tests/cases/compiler/functionOverloads23.ts === function foo(bar:(b:string)=>void); ->foo : typeof foo +>foo : { (bar: (b: string) => void): any; (bar: (a: number) => void): any; } >bar : (b: string) => void >b : string function foo(bar:(a:number)=>void); ->foo : typeof foo +>foo : { (bar: (b: string) => void): any; (bar: (a: number) => void): any; } >bar : (a: number) => void >a : number function foo(bar:(a?)=>void) { return 0 } ->foo : typeof foo +>foo : { (bar: (b: string) => void): any; (bar: (a: number) => void): any; } >bar : (a?: any) => void >a : any diff --git a/tests/baselines/reference/functionOverloads24.types b/tests/baselines/reference/functionOverloads24.types index cea176a6e05..f6f090d904f 100644 --- a/tests/baselines/reference/functionOverloads24.types +++ b/tests/baselines/reference/functionOverloads24.types @@ -1,16 +1,16 @@ === tests/cases/compiler/functionOverloads24.ts === function foo(bar:number):(b:string)=>void; ->foo : typeof foo +>foo : { (bar: number): (b: string) => void; (bar: string): (a: number) => void; } >bar : number >b : string function foo(bar:string):(a:number)=>void; ->foo : typeof foo +>foo : { (bar: number): (b: string) => void; (bar: string): (a: number) => void; } >bar : string >a : number function foo(bar:any):(a)=>void { return function(){} } ->foo : typeof foo +>foo : { (bar: number): (b: string) => void; (bar: string): (a: number) => void; } >bar : any >a : any >function(){} : () => void diff --git a/tests/baselines/reference/functionOverloads25.types b/tests/baselines/reference/functionOverloads25.types index e84ac94b798..ace77ebc9e4 100644 --- a/tests/baselines/reference/functionOverloads25.types +++ b/tests/baselines/reference/functionOverloads25.types @@ -1,17 +1,17 @@ === tests/cases/compiler/functionOverloads25.ts === function foo():string; ->foo : typeof foo +>foo : { (): string; (bar: string): number; } function foo(bar:string):number; ->foo : typeof foo +>foo : { (): string; (bar: string): number; } >bar : string function foo(bar?:any):any{ return '' }; ->foo : typeof foo +>foo : { (): string; (bar: string): number; } >bar : any var x = foo(); >x : string >foo() : string ->foo : typeof foo +>foo : { (): string; (bar: string): number; } diff --git a/tests/baselines/reference/functionOverloads26.types b/tests/baselines/reference/functionOverloads26.types index 40aad4298da..402003d7e7b 100644 --- a/tests/baselines/reference/functionOverloads26.types +++ b/tests/baselines/reference/functionOverloads26.types @@ -1,17 +1,17 @@ === tests/cases/compiler/functionOverloads26.ts === function foo():string; ->foo : typeof foo +>foo : { (): string; (bar: string): number; } function foo(bar:string):number; ->foo : typeof foo +>foo : { (): string; (bar: string): number; } >bar : string function foo(bar?:any):any{ return '' } ->foo : typeof foo +>foo : { (): string; (bar: string): number; } >bar : any var x = foo('baz'); >x : number >foo('baz') : number ->foo : typeof foo +>foo : { (): string; (bar: string): number; } diff --git a/tests/baselines/reference/functionOverloads28.types b/tests/baselines/reference/functionOverloads28.types index f27ae1b8c0c..034d35c64f7 100644 --- a/tests/baselines/reference/functionOverloads28.types +++ b/tests/baselines/reference/functionOverloads28.types @@ -1,19 +1,19 @@ === tests/cases/compiler/functionOverloads28.ts === function foo():string; ->foo : typeof foo +>foo : { (): string; (bar: string): number; } function foo(bar:string):number; ->foo : typeof foo +>foo : { (): string; (bar: string): number; } >bar : string function foo(bar?:any):any{ return '' } ->foo : typeof foo +>foo : { (): string; (bar: string): number; } >bar : any var t:any; var x = foo(t); >t : any >x : number >foo(t) : number ->foo : typeof foo +>foo : { (): string; (bar: string): number; } >t : any diff --git a/tests/baselines/reference/functionOverloads30.types b/tests/baselines/reference/functionOverloads30.types index 088e6f51127..80d43c952d9 100644 --- a/tests/baselines/reference/functionOverloads30.types +++ b/tests/baselines/reference/functionOverloads30.types @@ -1,19 +1,19 @@ === tests/cases/compiler/functionOverloads30.ts === function foo(bar:string):string; ->foo : typeof foo +>foo : { (bar: string): string; (bar: number): number; } >bar : string function foo(bar:number):number; ->foo : typeof foo +>foo : { (bar: string): string; (bar: number): number; } >bar : number function foo(bar:any):any{ return bar } ->foo : typeof foo +>foo : { (bar: string): string; (bar: number): number; } >bar : any >bar : any var x = foo('bar'); >x : string >foo('bar') : string ->foo : typeof foo +>foo : { (bar: string): string; (bar: number): number; } diff --git a/tests/baselines/reference/functionOverloads31.types b/tests/baselines/reference/functionOverloads31.types index 1005a2dc55c..4d7816166bc 100644 --- a/tests/baselines/reference/functionOverloads31.types +++ b/tests/baselines/reference/functionOverloads31.types @@ -1,19 +1,19 @@ === tests/cases/compiler/functionOverloads31.ts === function foo(bar:string):string; ->foo : typeof foo +>foo : { (bar: string): string; (bar: number): number; } >bar : string function foo(bar:number):number; ->foo : typeof foo +>foo : { (bar: string): string; (bar: number): number; } >bar : number function foo(bar:any):any{ return bar } ->foo : typeof foo +>foo : { (bar: string): string; (bar: number): number; } >bar : any >bar : any var x = foo(5); >x : number >foo(5) : number ->foo : typeof foo +>foo : { (bar: string): string; (bar: number): number; } diff --git a/tests/baselines/reference/functionOverloads32.types b/tests/baselines/reference/functionOverloads32.types index c858f2a54d1..df997e5d52a 100644 --- a/tests/baselines/reference/functionOverloads32.types +++ b/tests/baselines/reference/functionOverloads32.types @@ -1,14 +1,14 @@ === tests/cases/compiler/functionOverloads32.ts === function foo(bar:string):string; ->foo : typeof foo +>foo : { (bar: string): string; (bar: number): number; } >bar : string function foo(bar:number):number; ->foo : typeof foo +>foo : { (bar: string): string; (bar: number): number; } >bar : number function foo(bar:any):any{ return bar } ->foo : typeof foo +>foo : { (bar: string): string; (bar: number): number; } >bar : any >bar : any @@ -16,6 +16,6 @@ var baz:number; var x = foo(baz); >baz : number >x : number >foo(baz) : number ->foo : typeof foo +>foo : { (bar: string): string; (bar: number): number; } >baz : number diff --git a/tests/baselines/reference/functionOverloads33.types b/tests/baselines/reference/functionOverloads33.types index fd510ea959e..0199277180d 100644 --- a/tests/baselines/reference/functionOverloads33.types +++ b/tests/baselines/reference/functionOverloads33.types @@ -1,19 +1,19 @@ === tests/cases/compiler/functionOverloads33.ts === function foo(bar:string):string; ->foo : typeof foo +>foo : { (bar: string): string; (bar: any): number; } >bar : string function foo(bar:any):number; ->foo : typeof foo +>foo : { (bar: string): string; (bar: any): number; } >bar : any function foo(bar:any):any{ return bar } ->foo : typeof foo +>foo : { (bar: string): string; (bar: any): number; } >bar : any >bar : any var x = foo(5); >x : number >foo(5) : number ->foo : typeof foo +>foo : { (bar: string): string; (bar: any): number; } diff --git a/tests/baselines/reference/functionOverloads35.types b/tests/baselines/reference/functionOverloads35.types index db42ed0d47b..567f9512e3d 100644 --- a/tests/baselines/reference/functionOverloads35.types +++ b/tests/baselines/reference/functionOverloads35.types @@ -1,16 +1,16 @@ === tests/cases/compiler/functionOverloads35.ts === function foo(bar:{a:number;}):number; ->foo : typeof foo +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: number; } >a : number function foo(bar:{a:string;}):string; ->foo : typeof foo +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: string; } >a : string function foo(bar:{a:any;}):any{ return bar } ->foo : typeof foo +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: any; } >a : any >bar : { a: any; } @@ -18,7 +18,7 @@ function foo(bar:{a:any;}):any{ return bar } var x = foo({a:1}); >x : number >foo({a:1}) : number ->foo : typeof foo +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >{a:1} : { a: number; } >a : number diff --git a/tests/baselines/reference/functionOverloads36.types b/tests/baselines/reference/functionOverloads36.types index 3726bbea87d..8118a1c113a 100644 --- a/tests/baselines/reference/functionOverloads36.types +++ b/tests/baselines/reference/functionOverloads36.types @@ -1,16 +1,16 @@ === tests/cases/compiler/functionOverloads36.ts === function foo(bar:{a:number;}):number; ->foo : typeof foo +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: number; } >a : number function foo(bar:{a:string;}):string; ->foo : typeof foo +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: string; } >a : string function foo(bar:{a:any;}):any{ return bar } ->foo : typeof foo +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >bar : { a: any; } >a : any >bar : { a: any; } @@ -18,7 +18,7 @@ function foo(bar:{a:any;}):any{ return bar } var x = foo({a:'foo'}); >x : string >foo({a:'foo'}) : string ->foo : typeof foo +>foo : { (bar: { a: number; }): number; (bar: { a: string; }): string; } >{a:'foo'} : { a: string; } >a : string diff --git a/tests/baselines/reference/functionOverloads38.types b/tests/baselines/reference/functionOverloads38.types index 021ac7490ba..852191ba07f 100644 --- a/tests/baselines/reference/functionOverloads38.types +++ b/tests/baselines/reference/functionOverloads38.types @@ -1,16 +1,16 @@ === tests/cases/compiler/functionOverloads38.ts === function foo(bar:{a:number;}[]):string; ->foo : typeof foo +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: number; }[] >a : number function foo(bar:{a:boolean;}[]):number; ->foo : typeof foo +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: boolean; }[] >a : boolean function foo(bar:{a:any;}[]):any{ return bar } ->foo : typeof foo +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: any; }[] >a : any >bar : { a: any; }[] @@ -18,7 +18,7 @@ function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{a:1}]); >x : string >foo([{a:1}]) : string ->foo : typeof foo +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >[{a:1}] : { a: number; }[] >{a:1} : { a: number; } >a : number diff --git a/tests/baselines/reference/functionOverloads39.types b/tests/baselines/reference/functionOverloads39.types index 1cb1ebc43c1..70eee2b5163 100644 --- a/tests/baselines/reference/functionOverloads39.types +++ b/tests/baselines/reference/functionOverloads39.types @@ -1,16 +1,16 @@ === tests/cases/compiler/functionOverloads39.ts === function foo(bar:{a:number;}[]):string; ->foo : typeof foo +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: number; }[] >a : number function foo(bar:{a:boolean;}[]):number; ->foo : typeof foo +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: boolean; }[] >a : boolean function foo(bar:{a:any;}[]):any{ return bar } ->foo : typeof foo +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >bar : { a: any; }[] >a : any >bar : { a: any; }[] @@ -18,7 +18,7 @@ function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{a:true}]); >x : number >foo([{a:true}]) : number ->foo : typeof foo +>foo : { (bar: { a: number; }[]): string; (bar: { a: boolean; }[]): number; } >[{a:true}] : { a: boolean; }[] >{a:true} : { a: boolean; } >a : boolean diff --git a/tests/baselines/reference/functionOverloads42.types b/tests/baselines/reference/functionOverloads42.types index 298ffcbc437..dec6a041440 100644 --- a/tests/baselines/reference/functionOverloads42.types +++ b/tests/baselines/reference/functionOverloads42.types @@ -1,16 +1,16 @@ === tests/cases/compiler/functionOverloads42.ts === function foo(bar:{a:number;}[]):string; ->foo : typeof foo +>foo : { (bar: { a: number; }[]): string; (bar: { a: any; }[]): number; } >bar : { a: number; }[] >a : number function foo(bar:{a:any;}[]):number; ->foo : typeof foo +>foo : { (bar: { a: number; }[]): string; (bar: { a: any; }[]): number; } >bar : { a: any; }[] >a : any function foo(bar:{a:any;}[]):any{ return bar } ->foo : typeof foo +>foo : { (bar: { a: number; }[]): string; (bar: { a: any; }[]): number; } >bar : { a: any; }[] >a : any >bar : { a: any; }[] @@ -18,7 +18,7 @@ function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{a:'s'}]); >x : number >foo([{a:'s'}]) : number ->foo : typeof foo +>foo : { (bar: { a: number; }[]): string; (bar: { a: any; }[]): number; } >[{a:'s'}] : { a: any; }[] >{a:'s'} : { a: string; } >a : string diff --git a/tests/baselines/reference/functionOverloads8.types b/tests/baselines/reference/functionOverloads8.types index 9155a06e82e..e342db5d174 100644 --- a/tests/baselines/reference/functionOverloads8.types +++ b/tests/baselines/reference/functionOverloads8.types @@ -1,12 +1,12 @@ === tests/cases/compiler/functionOverloads8.ts === function foo(); ->foo : typeof foo +>foo : { (): any; (foo: string): any; } function foo(foo:string); ->foo : typeof foo +>foo : { (): any; (foo: string): any; } >foo : string function foo(foo?:any){ return '' } ->foo : typeof foo +>foo : { (): any; (foo: string): any; } >foo : any diff --git a/tests/baselines/reference/functionOverloads9.types b/tests/baselines/reference/functionOverloads9.types index f27d1ba797c..a844aee7df1 100644 --- a/tests/baselines/reference/functionOverloads9.types +++ b/tests/baselines/reference/functionOverloads9.types @@ -1,14 +1,14 @@ === tests/cases/compiler/functionOverloads9.ts === function foo(foo:string); ->foo : typeof foo +>foo : (foo: string) => any >foo : string function foo(foo?:string){ return '' }; ->foo : typeof foo +>foo : (foo: string) => any >foo : string var x = foo('foo'); >x : any >foo('foo') : any ->foo : typeof foo +>foo : (foo: string) => any diff --git a/tests/baselines/reference/functionOverloadsRecursiveGenericReturnType.types b/tests/baselines/reference/functionOverloadsRecursiveGenericReturnType.types index 7e9e07aff68..9fe33890b55 100644 --- a/tests/baselines/reference/functionOverloadsRecursiveGenericReturnType.types +++ b/tests/baselines/reference/functionOverloadsRecursiveGenericReturnType.types @@ -19,7 +19,7 @@ class A{ } function Choice(args: T[]): A; ->Choice : typeof Choice +>Choice : { (args: T[]): A; (...v_args: T[]): A; } >T : T >args : T[] >T : T @@ -27,7 +27,7 @@ function Choice(args: T[]): A; >T : T function Choice(...v_args: T[]): A; ->Choice : typeof Choice +>Choice : { (args: T[]): A; (...v_args: T[]): A; } >T : T >v_args : T[] >T : T @@ -35,7 +35,7 @@ function Choice(...v_args: T[]): A; >T : T function Choice(...v_args: any[]): A{ ->Choice : typeof Choice +>Choice : { (args: T[]): A; (...v_args: T[]): A; } >T : T >v_args : any[] >A : A diff --git a/tests/baselines/reference/functionReturn.types b/tests/baselines/reference/functionReturn.types index 1eb0342040f..0c1ee8eafc2 100644 --- a/tests/baselines/reference/functionReturn.types +++ b/tests/baselines/reference/functionReturn.types @@ -1,29 +1,29 @@ === tests/cases/compiler/functionReturn.ts === function f0(): void { } ->f0 : typeof f0 +>f0 : () => void function f1() { ->f1 : typeof f1 +>f1 : () => void var n: any = f0(); >n : any >f0() : void ->f0 : typeof f0 +>f0 : () => void } function f2(): any { } ->f2 : typeof f2 +>f2 : () => any function f3(): string { return; } ->f3 : typeof f3 +>f3 : () => string function f4(): string { ->f4 : typeof f4 +>f4 : () => string return ''; return; } function f5(): string { ->f5 : typeof f5 +>f5 : () => string return ''; return undefined; diff --git a/tests/baselines/reference/functionReturningItself.types b/tests/baselines/reference/functionReturningItself.types index 6505e574c5e..597202a55e2 100644 --- a/tests/baselines/reference/functionReturningItself.types +++ b/tests/baselines/reference/functionReturningItself.types @@ -1,7 +1,7 @@ === tests/cases/compiler/functionReturningItself.ts === function somefn() { ->somefn : typeof somefn +>somefn : () => typeof somefn return somefn; ->somefn : typeof somefn +>somefn : () => typeof somefn } diff --git a/tests/baselines/reference/functionType.types b/tests/baselines/reference/functionType.types index 74aafc7c8d0..4bbce7e096a 100644 --- a/tests/baselines/reference/functionType.types +++ b/tests/baselines/reference/functionType.types @@ -1,11 +1,11 @@ === tests/cases/compiler/functionType.ts === function salt() {} ->salt : typeof salt +>salt : () => void salt.apply("hello", []); >salt.apply("hello", []) : any >salt.apply : (thisArg: any, argArray?: any) => any ->salt : typeof salt +>salt : () => void >apply : (thisArg: any, argArray?: any) => any >[] : undefined[] diff --git a/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.types b/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.types index 6b0208b6b64..a5096d464d8 100644 --- a/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.types +++ b/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.types @@ -1,7 +1,7 @@ === tests/cases/compiler/functionWithAnyReturnTypeAndNoReturnExpression.ts === // All should be allowed function f(): any { } ->f : typeof f +>f : () => any var f2: () => any = () => { }; >f2 : () => any diff --git a/tests/baselines/reference/functionWithMultipleReturnStatements2.types b/tests/baselines/reference/functionWithMultipleReturnStatements2.types index 99aa5457f7b..706aca40c94 100644 --- a/tests/baselines/reference/functionWithMultipleReturnStatements2.types +++ b/tests/baselines/reference/functionWithMultipleReturnStatements2.types @@ -3,7 +3,7 @@ // no errors expected here function f1() { ->f1 : typeof f1 +>f1 : () => number if (true) { return 1; @@ -13,7 +13,7 @@ function f1() { } function f2() { ->f2 : typeof f2 +>f2 : () => number if (true) { return 1; @@ -25,7 +25,7 @@ function f2() { } function f4() { ->f4 : typeof f4 +>f4 : () => number try { return 1; @@ -42,7 +42,7 @@ function f4() { } function f5() { ->f5 : typeof f5 +>f5 : () => Object return 1; return new Object(); @@ -51,7 +51,7 @@ function f5() { } function f6(x: T) { ->f6 : typeof f6 +>f6 : (x: T) => T >T : T >x : T >T : T @@ -85,7 +85,7 @@ var b: { x: number; z?: number }; // returns typeof a function f9() { ->f9 : typeof f9 +>f9 : () => { x: number; y?: number; } if (true) { return a; @@ -99,7 +99,7 @@ function f9() { // returns typeof b function f10() { ->f10 : typeof f10 +>f10 : () => { x: number; z?: number; } if (true) { return b; @@ -113,7 +113,7 @@ function f10() { // returns number => void function f11() { ->f11 : typeof f11 +>f11 : () => (x: number) => void if (true) { return (x: number) => { } @@ -130,7 +130,7 @@ function f11() { // returns Object => void function f12() { ->f12 : typeof f12 +>f12 : () => (x: Object) => void if (true) { return (x: Object) => { } diff --git a/tests/baselines/reference/funduleUsedAcrossFileBoundary.types b/tests/baselines/reference/funduleUsedAcrossFileBoundary.types index 105246be7b0..09fc76a257b 100644 --- a/tests/baselines/reference/funduleUsedAcrossFileBoundary.types +++ b/tests/baselines/reference/funduleUsedAcrossFileBoundary.types @@ -16,13 +16,13 @@ declare module Q { >foo : string } export function defer(): string; ->defer : typeof defer +>defer : () => string >T : T } === tests/cases/compiler/funduleUsedAcrossFileBoundary_file2.ts === function promiseWithCancellation(promise: Q.Promise) { ->promiseWithCancellation : typeof promiseWithCancellation +>promiseWithCancellation : (promise: Q.Promise) => void >T : T >promise : Q.Promise >Q : unknown @@ -32,8 +32,8 @@ function promiseWithCancellation(promise: Q.Promise) { var deferred = Q.defer(); // used to be an error >deferred : string >Q.defer() : string ->Q.defer : typeof Q.defer +>Q.defer : () => string >Q : typeof Q ->defer : typeof Q.defer +>defer : () => string >T : T } diff --git a/tests/baselines/reference/generatedContextualTyping.types b/tests/baselines/reference/generatedContextualTyping.types index 13254eb8d22..57b5408eabe 100644 --- a/tests/baselines/reference/generatedContextualTyping.types +++ b/tests/baselines/reference/generatedContextualTyping.types @@ -1180,7 +1180,7 @@ class x120 { constructor(private parm: Genric = { func: n => { return [d1, >d2 : Derived2 function x121(parm: () => Base[] = () => [d1, d2]) { } ->x121 : typeof x121 +>x121 : (parm?: () => Base[]) => void >parm : () => Base[] >Base : Base >() => [d1, d2] : () => Base[] @@ -1189,7 +1189,7 @@ function x121(parm: () => Base[] = () => [d1, d2]) { } >d2 : Derived2 function x122(parm: () => Base[] = function() { return [d1, d2] }) { } ->x122 : typeof x122 +>x122 : (parm?: () => Base[]) => void >parm : () => Base[] >Base : Base >function() { return [d1, d2] } : () => Base[] @@ -1198,7 +1198,7 @@ function x122(parm: () => Base[] = function() { return [d1, d2] }) { } >d2 : Derived2 function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } ->x123 : typeof x123 +>x123 : (parm?: () => Base[]) => void >parm : () => Base[] >Base : Base >function named() { return [d1, d2] } : () => Base[] @@ -1208,7 +1208,7 @@ function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } >d2 : Derived2 function x124(parm: { (): Base[]; } = () => [d1, d2]) { } ->x124 : typeof x124 +>x124 : (parm?: () => Base[]) => void >parm : () => Base[] >Base : Base >() => [d1, d2] : () => Base[] @@ -1217,7 +1217,7 @@ function x124(parm: { (): Base[]; } = () => [d1, d2]) { } >d2 : Derived2 function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } ->x125 : typeof x125 +>x125 : (parm?: () => Base[]) => void >parm : () => Base[] >Base : Base >function() { return [d1, d2] } : () => Base[] @@ -1226,7 +1226,7 @@ function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } >d2 : Derived2 function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } ->x126 : typeof x126 +>x126 : (parm?: () => Base[]) => void >parm : () => Base[] >Base : Base >function named() { return [d1, d2] } : () => Base[] @@ -1236,7 +1236,7 @@ function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } >d2 : Derived2 function x127(parm: Base[] = [d1, d2]) { } ->x127 : typeof x127 +>x127 : (parm?: Base[]) => void >parm : Base[] >Base : Base >[d1, d2] : Base[] @@ -1244,7 +1244,7 @@ function x127(parm: Base[] = [d1, d2]) { } >d2 : Derived2 function x128(parm: Array = [d1, d2]) { } ->x128 : typeof x128 +>x128 : (parm?: Base[]) => void >parm : Base[] >Array : T[] >Base : Base @@ -1253,7 +1253,7 @@ function x128(parm: Array = [d1, d2]) { } >d2 : Derived2 function x129(parm: { [n: number]: Base; } = [d1, d2]) { } ->x129 : typeof x129 +>x129 : (parm?: { [x: number]: Base; }) => void >parm : { [x: number]: Base; } >n : number >Base : Base @@ -1262,7 +1262,7 @@ function x129(parm: { [n: number]: Base; } = [d1, d2]) { } >d2 : Derived2 function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } ->x130 : typeof x130 +>x130 : (parm?: { n: Base[]; }) => void >parm : { n: Base[]; } >n : Base[] >Base : Base @@ -1273,7 +1273,7 @@ function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } >d2 : Derived2 function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } ->x131 : typeof x131 +>x131 : (parm?: (s: Base[]) => any) => void >parm : (s: Base[]) => any >s : Base[] >Base : Base @@ -1283,7 +1283,7 @@ function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { >Base : Base function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } ->x132 : typeof x132 +>x132 : (parm?: Genric) => void >parm : Genric >Genric : Genric >Base : Base @@ -1296,7 +1296,7 @@ function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } >d2 : Derived2 function x133(): () => Base[] { return () => [d1, d2]; } ->x133 : typeof x133 +>x133 : () => () => Base[] >Base : Base >() => [d1, d2] : () => Base[] >[d1, d2] : Base[] @@ -1304,7 +1304,7 @@ function x133(): () => Base[] { return () => [d1, d2]; } >d2 : Derived2 function x134(): () => Base[] { return function() { return [d1, d2] }; } ->x134 : typeof x134 +>x134 : () => () => Base[] >Base : Base >function() { return [d1, d2] } : () => Base[] >[d1, d2] : Base[] @@ -1312,7 +1312,7 @@ function x134(): () => Base[] { return function() { return [d1, d2] }; } >d2 : Derived2 function x135(): () => Base[] { return function named() { return [d1, d2] }; } ->x135 : typeof x135 +>x135 : () => () => Base[] >Base : Base >function named() { return [d1, d2] } : () => Base[] >named : () => Base[] @@ -1321,7 +1321,7 @@ function x135(): () => Base[] { return function named() { return [d1, d2] }; } >d2 : Derived2 function x136(): { (): Base[]; } { return () => [d1, d2]; } ->x136 : typeof x136 +>x136 : () => () => Base[] >Base : Base >() => [d1, d2] : () => Base[] >[d1, d2] : Base[] @@ -1329,7 +1329,7 @@ function x136(): { (): Base[]; } { return () => [d1, d2]; } >d2 : Derived2 function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } ->x137 : typeof x137 +>x137 : () => () => Base[] >Base : Base >function() { return [d1, d2] } : () => Base[] >[d1, d2] : Base[] @@ -1337,7 +1337,7 @@ function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } >d2 : Derived2 function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } ->x138 : typeof x138 +>x138 : () => () => Base[] >Base : Base >function named() { return [d1, d2] } : () => Base[] >named : () => Base[] @@ -1346,14 +1346,14 @@ function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; >d2 : Derived2 function x139(): Base[] { return [d1, d2]; } ->x139 : typeof x139 +>x139 : () => Base[] >Base : Base >[d1, d2] : Base[] >d1 : Derived1 >d2 : Derived2 function x140(): Array { return [d1, d2]; } ->x140 : typeof x140 +>x140 : () => Base[] >Array : T[] >Base : Base >[d1, d2] : Base[] @@ -1361,7 +1361,7 @@ function x140(): Array { return [d1, d2]; } >d2 : Derived2 function x141(): { [n: number]: Base; } { return [d1, d2]; } ->x141 : typeof x141 +>x141 : () => { [x: number]: Base; } >n : number >Base : Base >[d1, d2] : Base[] @@ -1369,7 +1369,7 @@ function x141(): { [n: number]: Base; } { return [d1, d2]; } >d2 : Derived2 function x142(): {n: Base[]; } { return { n: [d1, d2] }; } ->x142 : typeof x142 +>x142 : () => { n: Base[]; } >n : Base[] >Base : Base >{ n: [d1, d2] } : { n: Base[]; } @@ -1379,7 +1379,7 @@ function x142(): {n: Base[]; } { return { n: [d1, d2] }; } >d2 : Derived2 function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; } ->x143 : typeof x143 +>x143 : () => (s: Base[]) => any >s : Base[] >Base : Base >n => { var n: Base[]; return null; } : (n: Base[]) => any @@ -1388,7 +1388,7 @@ function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; >Base : Base function x144(): Genric { return { func: n => { return [d1, d2]; } }; } ->x144 : typeof x144 +>x144 : () => Genric >Genric : Genric >Base : Base >{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => {}[]; } @@ -1400,7 +1400,7 @@ function x144(): Genric { return { func: n => { return [d1, d2]; } }; } >d2 : Derived2 function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } ->x145 : typeof x145 +>x145 : () => () => Base[] >Base : Base >() => [d1, d2] : () => Base[] >[d1, d2] : Base[] @@ -1412,7 +1412,7 @@ function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } >d2 : Derived2 function x146(): () => Base[] { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } ->x146 : typeof x146 +>x146 : () => () => Base[] >Base : Base >function() { return [d1, d2] } : () => Base[] >[d1, d2] : Base[] @@ -1424,7 +1424,7 @@ function x146(): () => Base[] { return function() { return [d1, d2] }; return fu >d2 : Derived2 function x147(): () => Base[] { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } ->x147 : typeof x147 +>x147 : () => () => Base[] >Base : Base >function named() { return [d1, d2] } : () => Base[] >named : () => Base[] @@ -1438,7 +1438,7 @@ function x147(): () => Base[] { return function named() { return [d1, d2] }; ret >d2 : Derived2 function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } ->x148 : typeof x148 +>x148 : () => () => Base[] >Base : Base >() => [d1, d2] : () => Base[] >[d1, d2] : Base[] @@ -1450,7 +1450,7 @@ function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; >d2 : Derived2 function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } ->x149 : typeof x149 +>x149 : () => () => Base[] >Base : Base >function() { return [d1, d2] } : () => Base[] >[d1, d2] : Base[] @@ -1462,7 +1462,7 @@ function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return >d2 : Derived2 function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } ->x150 : typeof x150 +>x150 : () => () => Base[] >Base : Base >function named() { return [d1, d2] } : () => Base[] >named : () => Base[] @@ -1476,7 +1476,7 @@ function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; >d2 : Derived2 function x151(): Base[] { return [d1, d2]; return [d1, d2]; } ->x151 : typeof x151 +>x151 : () => Base[] >Base : Base >[d1, d2] : Base[] >d1 : Derived1 @@ -1486,7 +1486,7 @@ function x151(): Base[] { return [d1, d2]; return [d1, d2]; } >d2 : Derived2 function x152(): Array { return [d1, d2]; return [d1, d2]; } ->x152 : typeof x152 +>x152 : () => Base[] >Array : T[] >Base : Base >[d1, d2] : Base[] @@ -1497,7 +1497,7 @@ function x152(): Array { return [d1, d2]; return [d1, d2]; } >d2 : Derived2 function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } ->x153 : typeof x153 +>x153 : () => { [x: number]: Base; } >n : number >Base : Base >[d1, d2] : Base[] @@ -1508,7 +1508,7 @@ function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } >d2 : Derived2 function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } ->x154 : typeof x154 +>x154 : () => { n: Base[]; } >n : Base[] >Base : Base >{ n: [d1, d2] } : { n: Base[]; } @@ -1523,7 +1523,7 @@ function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] } >d2 : Derived2 function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; } ->x155 : typeof x155 +>x155 : () => (s: Base[]) => any >s : Base[] >Base : Base >n => { var n: Base[]; return null; } : (n: Base[]) => any @@ -1536,7 +1536,7 @@ function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; >Base : Base function x156(): Genric { return { func: n => { return [d1, d2]; } }; return { func: n => { return [d1, d2]; } }; } ->x156 : typeof x156 +>x156 : () => Genric >Genric : Genric >Base : Base >{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => {}[]; } @@ -3248,33 +3248,33 @@ var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; >undefined : undefined function x321(n: () => Base[]) { }; x321(() => [d1, d2]); ->x321 : typeof x321 +>x321 : (n: () => Base[]) => void >n : () => Base[] >Base : Base >x321(() => [d1, d2]) : void ->x321 : typeof x321 +>x321 : (n: () => Base[]) => void >() => [d1, d2] : () => Base[] >[d1, d2] : Base[] >d1 : Derived1 >d2 : Derived2 function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); ->x322 : typeof x322 +>x322 : (n: () => Base[]) => void >n : () => Base[] >Base : Base >x322(function() { return [d1, d2] }) : void ->x322 : typeof x322 +>x322 : (n: () => Base[]) => void >function() { return [d1, d2] } : () => Base[] >[d1, d2] : Base[] >d1 : Derived1 >d2 : Derived2 function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); ->x323 : typeof x323 +>x323 : (n: () => Base[]) => void >n : () => Base[] >Base : Base >x323(function named() { return [d1, d2] }) : void ->x323 : typeof x323 +>x323 : (n: () => Base[]) => void >function named() { return [d1, d2] } : () => Base[] >named : () => Base[] >[d1, d2] : Base[] @@ -3282,33 +3282,33 @@ function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); >d2 : Derived2 function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); ->x324 : typeof x324 +>x324 : (n: () => Base[]) => void >n : () => Base[] >Base : Base >x324(() => [d1, d2]) : void ->x324 : typeof x324 +>x324 : (n: () => Base[]) => void >() => [d1, d2] : () => Base[] >[d1, d2] : Base[] >d1 : Derived1 >d2 : Derived2 function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); ->x325 : typeof x325 +>x325 : (n: () => Base[]) => void >n : () => Base[] >Base : Base >x325(function() { return [d1, d2] }) : void ->x325 : typeof x325 +>x325 : (n: () => Base[]) => void >function() { return [d1, d2] } : () => Base[] >[d1, d2] : Base[] >d1 : Derived1 >d2 : Derived2 function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); ->x326 : typeof x326 +>x326 : (n: () => Base[]) => void >n : () => Base[] >Base : Base >x326(function named() { return [d1, d2] }) : void ->x326 : typeof x326 +>x326 : (n: () => Base[]) => void >function named() { return [d1, d2] } : () => Base[] >named : () => Base[] >[d1, d2] : Base[] @@ -3316,44 +3316,44 @@ function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] } >d2 : Derived2 function x327(n: Base[]) { }; x327([d1, d2]); ->x327 : typeof x327 +>x327 : (n: Base[]) => void >n : Base[] >Base : Base >x327([d1, d2]) : void ->x327 : typeof x327 +>x327 : (n: Base[]) => void >[d1, d2] : Base[] >d1 : Derived1 >d2 : Derived2 function x328(n: Array) { }; x328([d1, d2]); ->x328 : typeof x328 +>x328 : (n: Base[]) => void >n : Base[] >Array : T[] >Base : Base >x328([d1, d2]) : void ->x328 : typeof x328 +>x328 : (n: Base[]) => void >[d1, d2] : Base[] >d1 : Derived1 >d2 : Derived2 function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); ->x329 : typeof x329 +>x329 : (n: { [x: number]: Base; }) => void >n : { [x: number]: Base; } >n : number >Base : Base >x329([d1, d2]) : void ->x329 : typeof x329 +>x329 : (n: { [x: number]: Base; }) => void >[d1, d2] : Base[] >d1 : Derived1 >d2 : Derived2 function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); ->x330 : typeof x330 +>x330 : (n: { n: Base[]; }) => void >n : { n: Base[]; } >n : Base[] >Base : Base >x330({ n: [d1, d2] }) : void ->x330 : typeof x330 +>x330 : (n: { n: Base[]; }) => void >{ n: [d1, d2] } : { n: Base[]; } >n : Base[] >[d1, d2] : Base[] @@ -3361,24 +3361,24 @@ function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); >d2 : Derived2 function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); ->x331 : typeof x331 +>x331 : (n: (s: Base[]) => any) => void >n : (s: Base[]) => any >s : Base[] >Base : Base >x331(n => { var n: Base[]; return null; }) : void ->x331 : typeof x331 +>x331 : (n: (s: Base[]) => any) => void >n => { var n: Base[]; return null; } : (n: Base[]) => any >n : Base[] >n : Base[] >Base : Base function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); ->x332 : typeof x332 +>x332 : (n: Genric) => void >n : Genric >Genric : Genric >Base : Base >x332({ func: n => { return [d1, d2]; } }) : void ->x332 : typeof x332 +>x332 : (n: Genric) => void >{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => {}[]; } >func : (n: Base[]) => {}[] >n => { return [d1, d2]; } : (n: Base[]) => {}[] diff --git a/tests/baselines/reference/generativeRecursionWithTypeOf.types b/tests/baselines/reference/generativeRecursionWithTypeOf.types index b26941d8793..1447c51358f 100644 --- a/tests/baselines/reference/generativeRecursionWithTypeOf.types +++ b/tests/baselines/reference/generativeRecursionWithTypeOf.types @@ -16,7 +16,7 @@ module M { >M : typeof M export function f(x: typeof C) { ->f : typeof f +>f : (x: typeof C) => C >x : typeof C >C : typeof C diff --git a/tests/baselines/reference/genericArray0.types b/tests/baselines/reference/genericArray0.types index 9118e312cd2..80a9d5199bd 100644 --- a/tests/baselines/reference/genericArray0.types +++ b/tests/baselines/reference/genericArray0.types @@ -10,7 +10,7 @@ var y = x; >x : number[] function map() { ->map : typeof map +>map : () => void >U : U var ys: U[] = []; diff --git a/tests/baselines/reference/genericArrayPropertyAssignment.types b/tests/baselines/reference/genericArrayPropertyAssignment.types index a0eea6f20f1..ab3f47de813 100644 --- a/tests/baselines/reference/genericArrayPropertyAssignment.types +++ b/tests/baselines/reference/genericArrayPropertyAssignment.types @@ -1,6 +1,6 @@ === tests/cases/compiler/genericArrayPropertyAssignment.ts === function isEmpty(list: {length:number;}) ->isEmpty : typeof isEmpty +>isEmpty : (list: { length: number; }) => boolean >list : { length: number; } >length : number { @@ -13,7 +13,7 @@ return list.length ===0; isEmpty([]); // error >isEmpty([]) : boolean ->isEmpty : typeof isEmpty +>isEmpty : (list: { length: number; }) => boolean >[] : undefined[] diff --git a/tests/baselines/reference/genericCallTypeArgumentInference.types b/tests/baselines/reference/genericCallTypeArgumentInference.types index f53018bddb1..ced2daee38d 100644 --- a/tests/baselines/reference/genericCallTypeArgumentInference.types +++ b/tests/baselines/reference/genericCallTypeArgumentInference.types @@ -2,7 +2,7 @@ // Basic type inference with generic calls, no errors expected function foo(t: T) { ->foo : typeof foo +>foo : (t: T) => T >T : T >t : T >T : T @@ -14,10 +14,10 @@ function foo(t: T) { var r = foo(''); // string >r : string >foo('') : string ->foo : typeof foo +>foo : (t: T) => T function foo2(t: T, u: U) { ->foo2 : typeof foo2 +>foo2 : (t: T, u: U) => U >T : T >U : U >t : T @@ -30,7 +30,7 @@ function foo2(t: T, u: U) { } function foo2b(u: U) { ->foo2b : typeof foo2b +>foo2b : (u: U) => T >T : T >U : U >u : U @@ -47,12 +47,12 @@ function foo2b(u: U) { var r2 = foo2('', 1); // number >r2 : number >foo2('', 1) : number ->foo2 : typeof foo2 +>foo2 : (t: T, u: U) => U var r3 = foo2b(1); // {} >r3 : {} >foo2b(1) : {} ->foo2b : typeof foo2b +>foo2b : (u: U) => T class C { >C : C diff --git a/tests/baselines/reference/genericCallWithArrayLiteralArgs.types b/tests/baselines/reference/genericCallWithArrayLiteralArgs.types index 09da2dd2e41..c79efb0792c 100644 --- a/tests/baselines/reference/genericCallWithArrayLiteralArgs.types +++ b/tests/baselines/reference/genericCallWithArrayLiteralArgs.types @@ -1,6 +1,6 @@ === tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithArrayLiteralArgs.ts === function foo(t: T) { ->foo : typeof foo +>foo : (t: T) => T >T : T >t : T >T : T @@ -12,49 +12,49 @@ function foo(t: T) { var r = foo([1, 2]); // number[] >r : number[] >foo([1, 2]) : number[] ->foo : typeof foo +>foo : (t: T) => T >[1, 2] : number[] var r = foo([1, 2]); // number[] >r : number[] >foo([1, 2]) : number[] ->foo : typeof foo +>foo : (t: T) => T >[1, 2] : number[] var ra = foo([1, 2]); // any[] >ra : any[] >foo([1, 2]) : any[] ->foo : typeof foo +>foo : (t: T) => T >[1, 2] : any[] var r2 = foo([]); // any[] >r2 : any[] >foo([]) : any[] ->foo : typeof foo +>foo : (t: T) => T >[] : any[] var r3 = foo([]); // number[] >r3 : number[] >foo([]) : number[] ->foo : typeof foo +>foo : (t: T) => T >[] : number[] var r4 = foo([1, '']); // {}[] >r4 : {}[] >foo([1, '']) : {}[] ->foo : typeof foo +>foo : (t: T) => T >[1, ''] : {}[] var r5 = foo([1, '']); // any[] >r5 : any[] >foo([1, '']) : any[] ->foo : typeof foo +>foo : (t: T) => T >[1, ''] : any[] var r6 = foo([1, '']); // Object[] >r6 : Object[] >foo([1, '']) : Object[] ->foo : typeof foo +>foo : (t: T) => T >Object : Object >[1, ''] : Object[] diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.types b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.types index 31e4ad647c5..dcff9ef8a16 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.types +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.types @@ -28,7 +28,7 @@ var d2: Derived2; >Derived2 : Derived2 function foo(t: T) { ->foo : typeof foo +>foo : (t: T) => T >T : T >Base : Base >t : T @@ -41,17 +41,17 @@ function foo(t: T) { var r = foo(b); // Base >r : Base >foo(b) : Base ->foo : typeof foo +>foo : (t: T) => T >b : Base var r2 = foo(d1); // Derived >r2 : Derived >foo(d1) : Derived ->foo : typeof foo +>foo : (t: T) => T >d1 : Derived function foo2(t: T, u: U) { ->foo2 : typeof foo2 +>foo2 : (t: T, u: U) => U >T : T >Base : Base >U : U @@ -66,7 +66,7 @@ function foo2(t: T, u: U) { } function foo2b(u: U) { ->foo2b : typeof foo2b +>foo2b : (u: U) => T >T : T >Base : Base >U : U @@ -83,7 +83,7 @@ function foo2b(u: U) { } function foo2c() { ->foo2c : typeof foo2c +>foo2c : () => T >T : T >Base : Base >U : U @@ -100,13 +100,13 @@ function foo2c() { var r3 = foo2b(d1); // Base >r3 : Base >foo2b(d1) : Base ->foo2b : typeof foo2b +>foo2b : (u: U) => T >d1 : Derived var r3b = foo2c(); // Base >r3b : Base >foo2c() : Base ->foo2c : typeof foo2c +>foo2c : () => T class C { >C : C diff --git a/tests/baselines/reference/genericCallWithFixedArguments.types b/tests/baselines/reference/genericCallWithFixedArguments.types index 3d40ceb3a06..acfad45a0f2 100644 --- a/tests/baselines/reference/genericCallWithFixedArguments.types +++ b/tests/baselines/reference/genericCallWithFixedArguments.types @@ -8,14 +8,14 @@ class B { bar() { }} >bar : () => void function g(x) { } ->g : typeof g +>g : (x: any) => void >T : T >U : U >x : any g(7) // the parameter list is fixed, so this should not error >g(7) : void ->g : typeof g +>g : (x: any) => void >A : A >B : B diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments.types b/tests/baselines/reference/genericCallWithFunctionTypedArguments.types index aec40c508df..2d3b234d0e1 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments.types +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments.types @@ -3,7 +3,7 @@ // Using function arguments, no errors expected function foo(x: (a: T) => T) { ->foo : typeof foo +>foo : (x: (a: T) => T) => T >T : T >x : (a: T) => T >a : T @@ -18,7 +18,7 @@ function foo(x: (a: T) => T) { var r = foo((x: U) => ''); // {} >r : {} >foo((x: U) => '') : {} ->foo : typeof foo +>foo : (x: (a: T) => T) => T >(x: U) => '' : (x: U) => string >U : U >x : U @@ -27,7 +27,7 @@ var r = foo((x: U) => ''); // {} var r2 = foo((x: U) => ''); // string >r2 : string >foo((x: U) => '') : string ->foo : typeof foo +>foo : (x: (a: T) => T) => T >(x: U) => '' : (x: U) => string >U : U >x : U @@ -36,12 +36,12 @@ var r2 = foo((x: U) => ''); // string var r3 = foo(x => ''); // {} >r3 : {} >foo(x => '') : {} ->foo : typeof foo +>foo : (x: (a: T) => T) => T >x => '' : (x: {}) => string >x : {} function foo2(x: T, cb: (a: T) => U) { ->foo2 : typeof foo2 +>foo2 : (x: T, cb: (a: T) => U) => U >T : T >U : U >x : T @@ -60,7 +60,7 @@ function foo2(x: T, cb: (a: T) => U) { var r4 = foo2(1, function (a: Z) { return '' }); // string, contextual signature instantiation is applied to generic functions >r4 : string >foo2(1, function (a: Z) { return '' }) : string ->foo2 : typeof foo2 +>foo2 : (x: T, cb: (a: T) => U) => U >function (a: Z) { return '' } : (a: Z) => string >Z : Z >a : Z @@ -69,21 +69,21 @@ var r4 = foo2(1, function (a: Z) { return '' }); // string, contextual signat var r5 = foo2(1, (a) => ''); // string >r5 : string >foo2(1, (a) => '') : string ->foo2 : typeof foo2 +>foo2 : (x: T, cb: (a: T) => U) => U >(a) => '' : (a: number) => string >a : number var r6 = foo2('', (a: Z) => 1); >r6 : number >foo2('', (a: Z) => 1) : number ->foo2 : typeof foo2 +>foo2 : (x: T, cb: (a: T) => U) => U >(a: Z) => 1 : (a: Z) => number >Z : Z >a : Z >Z : Z function foo3(x: T, cb: (a: T) => U, y: U) { ->foo3 : typeof foo3 +>foo3 : (x: T, cb: (a: T) => U, y: U) => U >T : T >U : U >x : T @@ -104,7 +104,7 @@ function foo3(x: T, cb: (a: T) => U, y: U) { var r7 = foo3(1, (a: Z) => '', ''); // string >r7 : string >foo3(1, (a: Z) => '', '') : string ->foo3 : typeof foo3 +>foo3 : (x: T, cb: (a: T) => U, y: U) => U >(a: Z) => '' : (a: Z) => string >Z : Z >a : Z @@ -113,19 +113,19 @@ var r7 = foo3(1, (a: Z) => '', ''); // string var r8 = foo3(1, function (a) { return '' }, 1); // {} >r8 : {} >foo3(1, function (a) { return '' }, 1) : {} ->foo3 : typeof foo3 +>foo3 : (x: T, cb: (a: T) => U, y: U) => U >function (a) { return '' } : (a: number) => string >a : number var r9 = foo3(1, (a) => '', ''); // string >r9 : string >foo3(1, (a) => '', '') : string ->foo3 : typeof foo3 +>foo3 : (x: T, cb: (a: T) => U, y: U) => U >(a) => '' : (a: number) => string >a : number function other(t: T, u: U) { ->other : typeof other +>other : (t: T, u: U) => void >T : T >U : U >t : T @@ -136,7 +136,7 @@ function other(t: T, u: U) { var r10 = foo2(1, (x: T) => ''); // string, non-generic signature allows inferences to be made >r10 : string >foo2(1, (x: T) => '') : string ->foo2 : typeof foo2 +>foo2 : (x: T, cb: (a: T) => U) => U >(x: T) => '' : (x: T) => string >x : T >T : T @@ -144,14 +144,14 @@ function other(t: T, u: U) { var r10 = foo2(1, (x) => ''); // string >r10 : string >foo2(1, (x) => '') : string ->foo2 : typeof foo2 +>foo2 : (x: T, cb: (a: T) => U) => U >(x) => '' : (x: number) => string >x : number var r11 = foo3(1, (x: T) => '', ''); // string >r11 : string >foo3(1, (x: T) => '', '') : string ->foo3 : typeof foo3 +>foo3 : (x: T, cb: (a: T) => U, y: U) => U >(x: T) => '' : (x: T) => string >x : T >T : T @@ -159,7 +159,7 @@ function other(t: T, u: U) { var r11b = foo3(1, (x: T) => '', 1); // {} >r11b : {} >foo3(1, (x: T) => '', 1) : {} ->foo3 : typeof foo3 +>foo3 : (x: T, cb: (a: T) => U, y: U) => U >(x: T) => '' : (x: T) => string >x : T >T : T @@ -167,7 +167,7 @@ function other(t: T, u: U) { var r12 = foo3(1, function (a) { return '' }, 1); // {} >r12 : {} >foo3(1, function (a) { return '' }, 1) : {} ->foo3 : typeof foo3 +>foo3 : (x: T, cb: (a: T) => U, y: U) => U >function (a) { return '' } : (a: number) => string >a : number } diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments2.types b/tests/baselines/reference/genericCallWithFunctionTypedArguments2.types index 09f86b64463..89d7afd94e2 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments2.types +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments2.types @@ -3,7 +3,7 @@ // Using construct signature arguments, no errors expected function foo(x: new(a: T) => T) { ->foo : typeof foo +>foo : (x: new (a: T) => T) => T >T : T >x : new (a: T) => T >a : T @@ -54,29 +54,29 @@ var a: { var r = foo(i); // any >r : any >foo(i) : any ->foo : typeof foo +>foo : (x: new (a: T) => T) => T >i : I var r2 = foo(i); // string >r2 : string >foo(i) : string ->foo : typeof foo +>foo : (x: new (a: T) => T) => T >i : I var r3 = foo(i2); // string >r3 : string >foo(i2) : string ->foo : typeof foo +>foo : (x: new (a: T) => T) => T >i2 : I2 var r3b = foo(a); // any >r3b : any >foo(a) : any ->foo : typeof foo +>foo : (x: new (a: T) => T) => T >a : new (x: T) => T function foo2(x: T, cb: new(a: T) => U) { ->foo2 : typeof foo2 +>foo2 : (x: T, cb: new (a: T) => U) => U >T : T >U : U >x : T @@ -95,29 +95,29 @@ function foo2(x: T, cb: new(a: T) => U) { var r4 = foo2(1, i2); // string, instantiated generic >r4 : string >foo2(1, i2) : string ->foo2 : typeof foo2 +>foo2 : (x: T, cb: new (a: T) => U) => U >i2 : I2 var r4b = foo2(1, a); // any >r4b : any >foo2(1, a) : any ->foo2 : typeof foo2 +>foo2 : (x: T, cb: new (a: T) => U) => U >a : new (x: T) => T var r5 = foo2(1, i); // any >r5 : any >foo2(1, i) : any ->foo2 : typeof foo2 +>foo2 : (x: T, cb: new (a: T) => U) => U >i : I var r6 = foo2('', i2); // string >r6 : string >foo2('', i2) : string ->foo2 : typeof foo2 +>foo2 : (x: T, cb: new (a: T) => U) => U >i2 : I2 function foo3(x: T, cb: new(a: T) => U, y: U) { ->foo3 : typeof foo3 +>foo3 : (x: T, cb: new (a: T) => U, y: U) => U >T : T >U : U >x : T @@ -138,24 +138,24 @@ function foo3(x: T, cb: new(a: T) => U, y: U) { var r7 = foo3(null, i, ''); // any >r7 : any >foo3(null, i, '') : any ->foo3 : typeof foo3 +>foo3 : (x: T, cb: new (a: T) => U, y: U) => U >i : I var r7b = foo3(null, a, ''); // any >r7b : any >foo3(null, a, '') : any ->foo3 : typeof foo3 +>foo3 : (x: T, cb: new (a: T) => U, y: U) => U >a : new (x: T) => T var r8 = foo3(1, i2, 1); // {} >r8 : {} >foo3(1, i2, 1) : {} ->foo3 : typeof foo3 +>foo3 : (x: T, cb: new (a: T) => U, y: U) => U >i2 : I2 var r9 = foo3('', i2, ''); // string >r9 : string >foo3('', i2, '') : string ->foo3 : typeof foo3 +>foo3 : (x: T, cb: new (a: T) => U, y: U) => U >i2 : I2 diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments3.types b/tests/baselines/reference/genericCallWithFunctionTypedArguments3.types index 988dcaa9c15..a6e491d3eb8 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments3.types +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments3.types @@ -12,7 +12,7 @@ var a: { } function foo4(cb: (x: T) => U) { ->foo4 : typeof foo4 +>foo4 : (cb: (x: T) => U) => U >T : T >U : U >cb : (x: T) => U @@ -31,7 +31,7 @@ function foo4(cb: (x: T) => U) { var r = foo4(a); // T is {} (candidates boolean and string), U is any (candidates any and boolean) >r : any >foo4(a) : any ->foo4 : typeof foo4 +>foo4 : (cb: (x: T) => U) => U >a : { (x: boolean): boolean; (x: string): any; } var b: { @@ -51,6 +51,6 @@ var b: { var r2 = foo4(b); // T is {} (candidates boolean and {}), U is any (candidates any and {}) >r2 : any >foo4(b) : any ->foo4 : typeof foo4 +>foo4 : (cb: (x: T) => U) => U >b : { (x: boolean): T; (x: T): any; } diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments4.types b/tests/baselines/reference/genericCallWithFunctionTypedArguments4.types index 7e2100be048..bf4e1eb749c 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments4.types +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments4.types @@ -22,7 +22,7 @@ var a: { } function foo4(cb: new(x: T) => U) { ->foo4 : typeof foo4 +>foo4 : (cb: new (x: T) => U) => U >T : T >U : U >cb : new (x: T) => U @@ -41,7 +41,7 @@ function foo4(cb: new(x: T) => U) { var r = foo4(a); // T is {} (candidates boolean and string), U is {} (candidates C and D) >r : D >foo4(a) : D ->foo4 : typeof foo4 +>foo4 : (cb: new (x: T) => U) => U >a : { new (x: boolean): C; new (x: string): D; } var b: { @@ -61,6 +61,6 @@ var b: { var r2 = foo4(b); // T is {} (candidates boolean and {}), U is any (candidates any and {}) >r2 : any >foo4(b) : any ->foo4 : typeof foo4 +>foo4 : (cb: new (x: T) => U) => U >b : { new (x: boolean): T; new (x: T): any; } diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments.types b/tests/baselines/reference/genericCallWithGenericSignatureArguments.types index 768bca10bdd..9f634070b56 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments.types +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments.types @@ -3,7 +3,7 @@ // the corresponding inferred type arguments to become fixed and no further candidate inferences are made for them. function foo(a: (x: T) => T, b: (x: T) => T) { ->foo : typeof foo +>foo : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >T : T >a : (x: T) => T >x : T @@ -28,7 +28,7 @@ function foo(a: (x: T) => T, b: (x: T) => T) { var r1b = foo((x) => 1, (x) => ''); // {} => {} >r1b : (x: {}) => {} >foo((x) => 1, (x) => '') : (x: {}) => {} ->foo : typeof foo +>foo : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(x) => 1 : (x: {}) => number >x : {} >(x) => '' : (x: {}) => string @@ -37,7 +37,7 @@ var r1b = foo((x) => 1, (x) => ''); // {} => {} var r2 = foo((x: Object) => null, (x: string) => ''); // Object => Object >r2 : (x: any) => any >foo((x: Object) => null, (x: string) => '') : (x: any) => any ->foo : typeof foo +>foo : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(x: Object) => null : (x: Object) => any >x : Object >Object : Object @@ -47,7 +47,7 @@ var r2 = foo((x: Object) => null, (x: string) => ''); // Object => Object var r3 = foo((x: number) => 1, (x: Object) => null); // number => number >r3 : (x: any) => any >foo((x: number) => 1, (x: Object) => null) : (x: any) => any ->foo : typeof foo +>foo : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(x: number) => 1 : (x: number) => number >x : number >(x: Object) => null : (x: Object) => any @@ -57,7 +57,7 @@ var r3 = foo((x: number) => 1, (x: Object) => null); // number => number var r3ii = foo((x: number) => 1, (x: number) => 1); // number => number >r3ii : (x: number) => number >foo((x: number) => 1, (x: number) => 1) : (x: number) => number ->foo : typeof foo +>foo : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(x: number) => 1 : (x: number) => number >x : number >(x: number) => 1 : (x: number) => number @@ -76,7 +76,7 @@ var b: { x: number; z?: number; }; var r4 = foo((x: typeof a) => a, (x: typeof b) => b); // typeof a => typeof a >r4 : (x: { x: number; y?: number; }) => { x: number; y?: number; } >foo((x: typeof a) => a, (x: typeof b) => b) : (x: { x: number; y?: number; }) => { x: number; y?: number; } ->foo : typeof foo +>foo : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(x: typeof a) => a : (x: { x: number; y?: number; }) => { x: number; y?: number; } >x : { x: number; y?: number; } >a : { x: number; y?: number; } @@ -89,7 +89,7 @@ var r4 = foo((x: typeof a) => a, (x: typeof b) => b); // typeof a => typeof a var r5 = foo((x: typeof b) => b, (x: typeof a) => a); // typeof b => typeof b >r5 : (x: { x: number; z?: number; }) => { x: number; z?: number; } >foo((x: typeof b) => b, (x: typeof a) => a) : (x: { x: number; z?: number; }) => { x: number; z?: number; } ->foo : typeof foo +>foo : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(x: typeof b) => b : (x: { x: number; z?: number; }) => { x: number; z?: number; } >x : { x: number; z?: number; } >b : { x: number; z?: number; } @@ -100,7 +100,7 @@ var r5 = foo((x: typeof b) => b, (x: typeof a) => a); // typeof b => typeof b >a : { x: number; y?: number; } function other(x: T) { ->other : typeof other +>other : (x: T) => void >T : T >x : T >T : T @@ -108,7 +108,7 @@ function other(x: T) { var r6 = foo((a: T) => a, (b: T) => b); // T => T >r6 : (x: T) => T >foo((a: T) => a, (b: T) => b) : (x: T) => T ->foo : typeof foo +>foo : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(a: T) => a : (a: T) => T >a : T >T : T @@ -121,7 +121,7 @@ function other(x: T) { var r6b = foo((a) => a, (b) => b); // {} => {} >r6b : (x: {}) => {} >foo((a) => a, (b) => b) : (x: {}) => {} ->foo : typeof foo +>foo : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(a) => a : (a: {}) => {} >a : {} >a : {} @@ -131,7 +131,7 @@ function other(x: T) { } function other2(x: T) { ->other2 : typeof other2 +>other2 : (x: T) => void >T : T >Date : Date >x : T @@ -140,7 +140,7 @@ function other2(x: T) { var r7 = foo((a: T) => a, (b: T) => b); // T => T >r7 : (x: T) => T >foo((a: T) => a, (b: T) => b) : (x: T) => T ->foo : typeof foo +>foo : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(a: T) => a : (a: T) => T >a : T >T : T @@ -153,7 +153,7 @@ function other2(x: T) { var r7b = foo((a) => a, (b) => b); // {} => {} >r7b : (x: {}) => {} >foo((a) => a, (b) => b) : (x: {}) => {} ->foo : typeof foo +>foo : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(a) => a : (a: {}) => {} >a : {} >a : {} @@ -172,7 +172,7 @@ function other2(x: T) { function foo2(a: (x: T) => T, b: (x: T) => T) { ->foo2 : typeof foo2 +>foo2 : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >T : T >Date : Date >a : (x: T) => T @@ -195,7 +195,7 @@ function foo2(a: (x: T) => T, b: (x: T) => T) { } function other3(x: T) { ->other3 : typeof other3 +>other3 : (x: T) => void >T : T >RegExp : RegExp >x : T @@ -204,7 +204,7 @@ function other3(x: T) { var r8 = foo2((a: Date) => a, (b: Date) => b); // Date => Date >r8 : (x: Date) => Date >foo2((a: Date) => a, (b: Date) => b) : (x: Date) => Date ->foo2 : typeof foo2 +>foo2 : (a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(a: Date) => a : (a: Date) => Date >a : Date >Date : Date diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.types b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.types index fc512f8eeb4..2c0d21a5a07 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.types +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.types @@ -3,7 +3,7 @@ // the corresponding inferred type arguments to become fixed and no further candidate inferences are made for them. function foo(x: T, a: (x: T) => T, b: (x: T) => T) { ->foo : typeof foo +>foo : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T >T : T >x : T >T : T @@ -29,7 +29,7 @@ function foo(x: T, a: (x: T) => T, b: (x: T) => T) { var r1 = foo('', (x: string) => '', (x: Object) => null); // any => any >r1 : (x: any) => any >foo('', (x: string) => '', (x: Object) => null) : (x: any) => any ->foo : typeof foo +>foo : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(x: string) => '' : (x: string) => string >x : string >(x: Object) => null : (x: Object) => any @@ -39,7 +39,7 @@ var r1 = foo('', (x: string) => '', (x: Object) => null); // any => any var r1ii = foo('', (x) => '', (x) => null); // string => string >r1ii : (x: string) => string >foo('', (x) => '', (x) => null) : (x: string) => string ->foo : typeof foo +>foo : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(x) => '' : (x: string) => string >x : string >(x) => null : (x: string) => any @@ -48,7 +48,7 @@ var r1ii = foo('', (x) => '', (x) => null); // string => string var r2 = foo('', (x: string) => '', (x: Object) => ''); // string => string >r2 : (x: Object) => Object >foo('', (x: string) => '', (x: Object) => '') : (x: Object) => Object ->foo : typeof foo +>foo : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(x: string) => '' : (x: string) => string >x : string >(x: Object) => '' : (x: Object) => string @@ -58,7 +58,7 @@ var r2 = foo('', (x: string) => '', (x: Object) => ''); // string => string var r3 = foo(null, (x: Object) => '', (x: string) => ''); // Object => Object >r3 : (x: Object) => Object >foo(null, (x: Object) => '', (x: string) => '') : (x: Object) => Object ->foo : typeof foo +>foo : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(x: Object) => '' : (x: Object) => string >x : Object >Object : Object @@ -68,7 +68,7 @@ var r3 = foo(null, (x: Object) => '', (x: string) => ''); // Object => Object var r4 = foo(null, (x) => '', (x) => ''); // any => any >r4 : (x: any) => any >foo(null, (x) => '', (x) => '') : (x: any) => any ->foo : typeof foo +>foo : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T >(x) => '' : (x: any) => string >x : any >(x) => '' : (x: any) => string @@ -77,7 +77,7 @@ var r4 = foo(null, (x) => '', (x) => ''); // any => any var r5 = foo(new Object(), (x) => '', (x) => ''); // Object => Object >r5 : (x: Object) => Object >foo(new Object(), (x) => '', (x) => '') : (x: Object) => Object ->foo : typeof foo +>foo : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T >new Object() : Object >Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; } >(x) => '' : (x: Object) => string @@ -96,7 +96,7 @@ enum F { A } var r6 = foo(E.A, (x: number) => E.A, (x: F) => F.A); // number => number >r6 : (x: number) => number >foo(E.A, (x: number) => E.A, (x: F) => F.A) : (x: number) => number ->foo : typeof foo +>foo : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T >E.A : E >E : typeof E >A : E @@ -114,7 +114,7 @@ var r6 = foo(E.A, (x: number) => E.A, (x: F) => F.A); // number => number function foo2(x: T, a: (x: T) => U, b: (x: T) => U) { ->foo2 : typeof foo2 +>foo2 : (x: T, a: (x: T) => U, b: (x: T) => U) => (x: T) => U >T : T >U : U >x : T @@ -141,7 +141,7 @@ function foo2(x: T, a: (x: T) => U, b: (x: T) => U) { var r8 = foo2('', (x) => '', (x) => null); // string => string >r8 : (x: string) => any >foo2('', (x) => '', (x) => null) : (x: string) => any ->foo2 : typeof foo2 +>foo2 : (x: T, a: (x: T) => U, b: (x: T) => U) => (x: T) => U >(x) => '' : (x: string) => string >x : string >(x) => null : (x: string) => any @@ -150,7 +150,7 @@ var r8 = foo2('', (x) => '', (x) => null); // string => string var r9 = foo2(null, (x) => '', (x) => ''); // any => any >r9 : (x: any) => string >foo2(null, (x) => '', (x) => '') : (x: any) => string ->foo2 : typeof foo2 +>foo2 : (x: T, a: (x: T) => U, b: (x: T) => U) => (x: T) => U >(x) => '' : (x: any) => string >x : any >(x) => '' : (x: any) => string @@ -159,7 +159,7 @@ var r9 = foo2(null, (x) => '', (x) => ''); // any => any var r10 = foo2(null, (x: Object) => '', (x: string) => ''); // Object => Object >r10 : (x: Object) => string >foo2(null, (x: Object) => '', (x: string) => '') : (x: Object) => string ->foo2 : typeof foo2 +>foo2 : (x: T, a: (x: T) => U, b: (x: T) => U) => (x: T) => U >(x: Object) => '' : (x: Object) => string >x : Object >Object : Object @@ -173,7 +173,7 @@ var x: (a: string) => boolean; var r11 = foo2(x, (a1: (y: string) => string) => (n: Object) => 1, (a2: (z: string) => string) => 2); // {} => {} >r11 : (x: {}) => {} >foo2(x, (a1: (y: string) => string) => (n: Object) => 1, (a2: (z: string) => string) => 2) : (x: {}) => {} ->foo2 : typeof foo2 +>foo2 : (x: T, a: (x: T) => U, b: (x: T) => U) => (x: T) => U >x : (a: string) => boolean >(a1: (y: string) => string) => (n: Object) => 1 : (a1: (y: string) => string) => (n: Object) => number >a1 : (y: string) => string @@ -188,7 +188,7 @@ var r11 = foo2(x, (a1: (y: string) => string) => (n: Object) => 1, (a2: (z: stri var r12 = foo2(x, (a1: (y: string) => boolean) => (n: Object) => 1, (a2: (z: string) => boolean) => 2); // (string => boolean) => {} >r12 : (x: (a: string) => boolean) => {} >foo2(x, (a1: (y: string) => boolean) => (n: Object) => 1, (a2: (z: string) => boolean) => 2) : (x: (a: string) => boolean) => {} ->foo2 : typeof foo2 +>foo2 : (x: T, a: (x: T) => U, b: (x: T) => U) => (x: T) => U >x : (a: string) => boolean >(a1: (y: string) => boolean) => (n: Object) => 1 : (a1: (y: string) => boolean) => (n: Object) => number >a1 : (y: string) => boolean diff --git a/tests/baselines/reference/genericCallWithNonGenericArgs1.types b/tests/baselines/reference/genericCallWithNonGenericArgs1.types index 8b885d4f677..f08f8503075 100644 --- a/tests/baselines/reference/genericCallWithNonGenericArgs1.types +++ b/tests/baselines/reference/genericCallWithNonGenericArgs1.types @@ -1,10 +1,10 @@ === tests/cases/compiler/genericCallWithNonGenericArgs1.ts === function f(x: any) { } ->f : typeof f +>f : (x: any) => void >T : T >x : any f(null) >f(null) : void ->f : typeof f +>f : (x: any) => void diff --git a/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.types b/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.types index dd08de2ab05..e37a010baed 100644 --- a/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.types +++ b/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.types @@ -3,7 +3,7 @@ // we choose the first candidate so the result is dependent on the order of the arguments provided function foo(x: T, y: T) { ->foo : typeof foo +>foo : (x: T, y: T) => T >T : T >x : T >T : T @@ -31,14 +31,14 @@ var b: { x: number; z?: number; }; var r = foo(a, b); // { x: number; y?: number; }; >r : { x: number; y?: number; } >foo(a, b) : { x: number; y?: number; } ->foo : typeof foo +>foo : (x: T, y: T) => T >a : { x: number; y?: number; } >b : { x: number; z?: number; } var r2 = foo(b, a); // { x: number; z?: number; }; >r2 : { x: number; z?: number; } >foo(b, a) : { x: number; z?: number; } ->foo : typeof foo +>foo : (x: T, y: T) => T >b : { x: number; z?: number; } >a : { x: number; y?: number; } @@ -53,42 +53,42 @@ var y: { x?: number; }; var r3 = foo(a, x); // { x: number; y?: number; }; >r3 : { x: number; y?: number; } >foo(a, x) : { x: number; y?: number; } ->foo : typeof foo +>foo : (x: T, y: T) => T >a : { x: number; y?: number; } >x : { x: number; } var r4 = foo(x, a); // { x: number; }; >r4 : { x: number; } >foo(x, a) : { x: number; } ->foo : typeof foo +>foo : (x: T, y: T) => T >x : { x: number; } >a : { x: number; y?: number; } var r5 = foo(a, y); // { x?: number; }; >r5 : { x?: number; } >foo(a, y) : { x?: number; } ->foo : typeof foo +>foo : (x: T, y: T) => T >a : { x: number; y?: number; } >y : { x?: number; } var r5 = foo(y, a); // { x?: number; }; >r5 : { x?: number; } >foo(y, a) : { x?: number; } ->foo : typeof foo +>foo : (x: T, y: T) => T >y : { x?: number; } >a : { x: number; y?: number; } var r6 = foo(x, y); // { x?: number; }; >r6 : { x?: number; } >foo(x, y) : { x?: number; } ->foo : typeof foo +>foo : (x: T, y: T) => T >x : { x: number; } >y : { x?: number; } var r6 = foo(y, x); // { x?: number; }; >r6 : { x?: number; } >foo(y, x) : { x?: number; } ->foo : typeof foo +>foo : (x: T, y: T) => T >y : { x?: number; } >x : { x: number; } @@ -104,14 +104,14 @@ var s2: (x: string) => string; var r7 = foo(s1, s2); // (x: Object) => string; >r7 : (x: Object) => string >foo(s1, s2) : (x: Object) => string ->foo : typeof foo +>foo : (x: T, y: T) => T >s1 : (x: Object) => string >s2 : (x: string) => string var r8 = foo(s2, s1); // (x: string) => string; >r8 : (x: string) => string >foo(s2, s1) : (x: string) => string ->foo : typeof foo +>foo : (x: T, y: T) => T >s2 : (x: string) => string >s1 : (x: Object) => string diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArgs.types b/tests/baselines/reference/genericCallWithObjectLiteralArgs.types index 16919db4496..d23445ecbca 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArgs.types +++ b/tests/baselines/reference/genericCallWithObjectLiteralArgs.types @@ -1,6 +1,6 @@ === tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectLiteralArgs.ts === function foo(x: { bar: T; baz: T }) { ->foo : typeof foo +>foo : (x: { bar: T; baz: T; }) => { bar: T; baz: T; } >T : T >x : { bar: T; baz: T; } >bar : T @@ -15,7 +15,7 @@ function foo(x: { bar: T; baz: T }) { var r = foo({ bar: 1, baz: '' }); // T = {} >r : { bar: {}; baz: {}; } >foo({ bar: 1, baz: '' }) : { bar: {}; baz: {}; } ->foo : typeof foo +>foo : (x: { bar: T; baz: T; }) => { bar: T; baz: T; } >{ bar: 1, baz: '' } : { bar: number; baz: string; } >bar : number >baz : string @@ -23,25 +23,25 @@ var r = foo({ bar: 1, baz: '' }); // T = {} var r2 = foo({ bar: 1, baz: 1 }); // T = number >r2 : { bar: number; baz: number; } >foo({ bar: 1, baz: 1 }) : { bar: number; baz: number; } ->foo : typeof foo +>foo : (x: { bar: T; baz: T; }) => { bar: T; baz: T; } >{ bar: 1, baz: 1 } : { bar: number; baz: number; } >bar : number >baz : number var r3 = foo({ bar: foo, baz: foo }); // T = typeof foo ->r3 : { bar: typeof foo; baz: typeof foo; } ->foo({ bar: foo, baz: foo }) : { bar: typeof foo; baz: typeof foo; } ->foo : typeof foo ->{ bar: foo, baz: foo } : { bar: typeof foo; baz: typeof foo; } ->bar : typeof foo ->foo : typeof foo ->baz : typeof foo ->foo : typeof foo +>r3 : { bar: (x: { bar: T; baz: T; }) => { bar: T; baz: T; }; baz: (x: { bar: T; baz: T; }) => { bar: T; baz: T; }; } +>foo({ bar: foo, baz: foo }) : { bar: (x: { bar: T; baz: T; }) => { bar: T; baz: T; }; baz: (x: { bar: T; baz: T; }) => { bar: T; baz: T; }; } +>foo : (x: { bar: T; baz: T; }) => { bar: T; baz: T; } +>{ bar: foo, baz: foo } : { bar: (x: { bar: T; baz: T; }) => { bar: T; baz: T; }; baz: (x: { bar: T; baz: T; }) => { bar: T; baz: T; }; } +>bar : (x: { bar: T; baz: T; }) => { bar: T; baz: T; } +>foo : (x: { bar: T; baz: T; }) => { bar: T; baz: T; } +>baz : (x: { bar: T; baz: T; }) => { bar: T; baz: T; } +>foo : (x: { bar: T; baz: T; }) => { bar: T; baz: T; } var r4 = foo({ bar: 1, baz: '' }); // T = Object >r4 : { bar: Object; baz: Object; } >foo({ bar: 1, baz: '' }) : { bar: Object; baz: Object; } ->foo : typeof foo +>foo : (x: { bar: T; baz: T; }) => { bar: T; baz: T; } >Object : Object >{ bar: 1, baz: '' } : { bar: number; baz: string; } >bar : number diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs.types b/tests/baselines/reference/genericCallWithObjectTypeArgs.types index c2bb114c455..ddbd7d83054 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs.types @@ -23,7 +23,7 @@ class X { } function foo(t: X, t2: X) { ->foo : typeof foo +>foo : (t: X, t2: X) => T >T : T >t : X >X : X @@ -55,14 +55,14 @@ var d1 = new X(); var r = foo(c1, d1); // error >r : {} >foo(c1, d1) : {} ->foo : typeof foo +>foo : (t: X, t2: X) => T >c1 : X >d1 : X var r2 = foo(c1, c1); // ok >r2 : C >foo(c1, c1) : C ->foo : typeof foo +>foo : (t: X, t2: X) => T >c1 : X >c1 : X diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.types b/tests/baselines/reference/genericCallWithObjectTypeArgs2.types index 35d38e3f065..0065811fdc1 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.types @@ -22,7 +22,7 @@ class Derived2 extends Base { // returns {}[] function f(a: { x: T; y: U }) { ->f : typeof f +>f : (a: { x: T; y: U; }) => {}[] >T : T >Base : Base >U : U @@ -46,7 +46,7 @@ function f(a: { x: T; y: U }) { var r = f({ x: new Derived(), y: new Derived2() }); // {}[] >r : {}[] >f({ x: new Derived(), y: new Derived2() }) : {}[] ->f : typeof f +>f : (a: { x: T; y: U; }) => {}[] >{ x: new Derived(), y: new Derived2() } : { x: Derived; y: Derived2; } >x : Derived >new Derived() : Derived @@ -58,7 +58,7 @@ var r = f({ x: new Derived(), y: new Derived2() }); // {}[] var r2 = f({ x: new Base(), y: new Derived2() }); // {}[] >r2 : {}[] >f({ x: new Base(), y: new Derived2() }) : {}[] ->f : typeof f +>f : (a: { x: T; y: U; }) => {}[] >{ x: new Base(), y: new Derived2() } : { x: Base; y: Derived2; } >x : Base >new Base() : Base @@ -69,7 +69,7 @@ var r2 = f({ x: new Base(), y: new Derived2() }); // {}[] function f2(a: { x: T; y: U }) { ->f2 : typeof f2 +>f2 : (a: { x: T; y: U; }) => (x: T) => U >T : T >Base : Base >U : U @@ -92,7 +92,7 @@ function f2(a: { x: T; y: U }) { var r3 = f2({ x: new Derived(), y: new Derived2() }); // Derived => Derived2 >r3 : (x: Derived) => Derived2 >f2({ x: new Derived(), y: new Derived2() }) : (x: Derived) => Derived2 ->f2 : typeof f2 +>f2 : (a: { x: T; y: U; }) => (x: T) => U >{ x: new Derived(), y: new Derived2() } : { x: Derived; y: Derived2; } >x : Derived >new Derived() : Derived @@ -124,6 +124,6 @@ var i: I; var r4 = f2(i); // Base => Derived >r4 : (x: Base) => Derived >f2(i) : (x: Base) => Derived ->f2 : typeof f2 +>f2 : (a: { x: T; y: U; }) => (x: T) => U >i : I diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints.types index 852196e93f9..8e062a8d5bf 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints.types @@ -29,7 +29,7 @@ class X { } function foo(t: X, t2: X) { ->foo : typeof foo +>foo : (t: X, t2: X) => T >T : T >x : string >t : X @@ -62,19 +62,19 @@ var d1 = new X(); var r = foo(c1, d1); >r : C >foo(c1, d1) : C ->foo : typeof foo +>foo : (t: X, t2: X) => T >c1 : X >d1 : X var r2 = foo(c1, c1); >r2 : C >foo(c1, c1) : C ->foo : typeof foo +>foo : (t: X, t2: X) => T >c1 : X >c1 : X function foo2(t: X, t2: X) { ->foo2 : typeof foo2 +>foo2 : (t: X, t2: X) => T >T : T >C : C >t : X @@ -95,14 +95,14 @@ function foo2(t: X, t2: X) { var r = foo2(c1, d1); >r : C >foo2(c1, d1) : C ->foo2 : typeof foo2 +>foo2 : (t: X, t2: X) => T >c1 : X >d1 : X var r2 = foo2(c1, c1); >r2 : C >foo2(c1, c1) : C ->foo2 : typeof foo2 +>foo2 : (t: X, t2: X) => T >c1 : X >c1 : X diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.types index db9db6422e1..29706ba7e3d 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.types @@ -17,7 +17,7 @@ class Derived extends Base { } function f(x: { foo: T; bar: T }) { ->f : typeof f +>f : (x: { foo: T; bar: T; }) => T >T : T >Base : Base >x : { foo: T; bar: T; } @@ -36,7 +36,7 @@ function f(x: { foo: T; bar: T }) { var r = f({ foo: new Base(), bar: new Derived() }); >r : Base >f({ foo: new Base(), bar: new Derived() }) : Base ->f : typeof f +>f : (x: { foo: T; bar: T; }) => T >{ foo: new Base(), bar: new Derived() } : { foo: Base; bar: Derived; } >foo : Base >new Base() : Base @@ -48,7 +48,7 @@ var r = f({ foo: new Base(), bar: new Derived() }); var r2 = f({ foo: new Derived(), bar: new Derived() }); >r2 : Derived >f({ foo: new Derived(), bar: new Derived() }) : Derived ->f : typeof f +>f : (x: { foo: T; bar: T; }) => T >{ foo: new Derived(), bar: new Derived() } : { foo: Derived; bar: Derived; } >foo : Derived >new Derived() : Derived @@ -67,7 +67,7 @@ interface I { >T : T } function f2(x: I) { ->f2 : typeof f2 +>f2 : (x: I) => T >T : T >Base : Base >x : I @@ -89,12 +89,12 @@ var i: I; var r3 = f2(i); >r3 : Derived >f2(i) : Derived ->f2 : typeof f2 +>f2 : (x: I) => T >i : I function f3(x: T, y: (a: T) => T) { ->f3 : typeof f3 +>f3 : (x: T, y: (a: T) => T) => T >T : T >Base : Base >x : T @@ -111,7 +111,7 @@ function f3(x: T, y: (a: T) => T) { var r4 = f3(new Base(), x => x); >r4 : Base >f3(new Base(), x => x) : Base ->f3 : typeof f3 +>f3 : (x: T, y: (a: T) => T) => T >new Base() : Base >Base : typeof Base >x => x : (x: Base) => Base @@ -121,7 +121,7 @@ var r4 = f3(new Base(), x => x); var r5 = f3(new Derived(), x => x); >r5 : Derived >f3(new Derived(), x => x) : Derived ->f3 : typeof f3 +>f3 : (x: T, y: (a: T) => T) => T >new Derived() : Derived >Derived : typeof Derived >x => x : (x: Derived) => Derived @@ -131,12 +131,12 @@ var r5 = f3(new Derived(), x => x); var r6 = f3(null, null); // any >r6 : any >f3(null, null) : any ->f3 : typeof f3 +>f3 : (x: T, y: (a: T) => T) => T var r7 = f3(null, x => x); // any >r7 : any >f3(null, x => x) : any ->f3 : typeof f3 +>f3 : (x: T, y: (a: T) => T) => T >x => x : (x: any) => any >x : any >x : any diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexers.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexers.types index 81f4fe5f6d2..9a7ca1dbb91 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexers.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexers.types @@ -2,7 +2,7 @@ // Type inference infers from indexers in target type, no errors expected function foo(x: T) { ->foo : typeof foo +>foo : (x: T) => T >T : T >x : T >T : T @@ -26,11 +26,11 @@ var a: { var r = foo(a); >r : { [x: string]: Object; [x: number]: Date; } >foo(a) : { [x: string]: Object; [x: number]: Date; } ->foo : typeof foo +>foo : (x: T) => T >a : { [x: string]: Object; [x: number]: Date; } function other(arg: T) { ->other : typeof other +>other : (arg: T) => void >T : T >Date : Date >arg : T @@ -51,7 +51,7 @@ function other(arg: T) { var r2 = foo(b); >r2 : { [x: string]: Object; [x: number]: T; } >foo(b) : { [x: string]: Object; [x: number]: T; } ->foo : typeof foo +>foo : (x: T) => T >b : { [x: string]: Object; [x: number]: T; } var d = r2[1]; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndNumericIndexer.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndNumericIndexer.types index 497aa0b443e..f4b3f5960f0 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndNumericIndexer.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndNumericIndexer.types @@ -2,7 +2,7 @@ // Type inference infers from indexers in target type, no errors expected function foo(x: T) { ->foo : typeof foo +>foo : (x: T) => T >T : T >x : T >T : T @@ -19,11 +19,11 @@ var a: { [x: number]: Date }; var r = foo(a); >r : { [x: number]: Date; } >foo(a) : { [x: number]: Date; } ->foo : typeof foo +>foo : (x: T) => T >a : { [x: number]: Date; } function other(arg: T) { ->other : typeof other +>other : (arg: T) => void >T : T >arg : T >T : T @@ -36,12 +36,12 @@ function other(arg: T) { var r2 = foo(b); // T >r2 : { [x: number]: T; } >foo(b) : { [x: number]: T; } ->foo : typeof foo +>foo : (x: T) => T >b : { [x: number]: T; } } function other2(arg: T) { ->other2 : typeof other2 +>other2 : (arg: T) => void >T : T >Date : Date >arg : T @@ -55,7 +55,7 @@ function other2(arg: T) { var r2 = foo(b); >r2 : { [x: number]: T; } >foo(b) : { [x: number]: T; } ->foo : typeof foo +>foo : (x: T) => T >b : { [x: number]: T; } var d = r2[1]; @@ -65,7 +65,7 @@ function other2(arg: T) { } function other3(arg: T) { ->other3 : typeof other3 +>other3 : (arg: T) => void >T : T >Date : Date >U : U @@ -81,7 +81,7 @@ function other3(arg: T) { var r2 = foo(b); >r2 : { [x: number]: T; } >foo(b) : { [x: number]: T; } ->foo : typeof foo +>foo : (x: T) => T >b : { [x: number]: T; } var d = r2[1]; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.types b/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.types index 133a4a6c6a9..e52e6cff113 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.types +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.types @@ -2,7 +2,7 @@ // Type inference infers from indexers in target type, no errors expected function foo(x: T) { ->foo : typeof foo +>foo : (x: T) => T >T : T >x : T >T : T @@ -19,11 +19,11 @@ var a: { [x: string]: Date }; var r = foo(a); >r : { [x: string]: Date; } >foo(a) : { [x: string]: Date; } ->foo : typeof foo +>foo : (x: T) => T >a : { [x: string]: Date; } function other(arg: T) { ->other : typeof other +>other : (arg: T) => void >T : T >arg : T >T : T @@ -36,12 +36,12 @@ function other(arg: T) { var r2 = foo(b); // T >r2 : { [x: string]: T; } >foo(b) : { [x: string]: T; } ->foo : typeof foo +>foo : (x: T) => T >b : { [x: string]: T; } } function other2(arg: T) { ->other2 : typeof other2 +>other2 : (arg: T) => void >T : T >Date : Date >arg : T @@ -55,7 +55,7 @@ function other2(arg: T) { var r2 = foo(b); >r2 : { [x: string]: T; } >foo(b) : { [x: string]: T; } ->foo : typeof foo +>foo : (x: T) => T >b : { [x: string]: T; } var d: Date = r2['hm']; // ok @@ -66,7 +66,7 @@ function other2(arg: T) { } function other3(arg: T) { ->other3 : typeof other3 +>other3 : (arg: T) => void >T : T >Date : Date >U : U @@ -82,7 +82,7 @@ function other3(arg: T) { var r2 = foo(b); >r2 : { [x: string]: T; } >foo(b) : { [x: string]: T; } ->foo : typeof foo +>foo : (x: T) => T >b : { [x: string]: T; } var d: Date = r2['hm']; // ok diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types index 2a9b0c2e861..6c16ad0259c 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types @@ -16,7 +16,7 @@ module NonGenericParameter { } function foo4(cb: typeof a) { ->foo4 : typeof foo4 +>foo4 : (cb: { new (x: boolean): boolean; new (x: string): string; }) => boolean >cb : { new (x: boolean): boolean; new (x: string): string; } >a : { new (x: boolean): boolean; new (x: string): string; } @@ -28,7 +28,7 @@ module NonGenericParameter { var r = foo4(a); >r : boolean >foo4(a) : boolean ->foo4 : typeof foo4 +>foo4 : (cb: { new (x: boolean): boolean; new (x: string): string; }) => boolean >a : { new (x: boolean): boolean; new (x: string): string; } var b: { new (x: T): T }; @@ -41,7 +41,7 @@ module NonGenericParameter { var r2 = foo4(b); >r2 : boolean >foo4(b) : boolean ->foo4 : typeof foo4 +>foo4 : (cb: { new (x: boolean): boolean; new (x: string): string; }) => boolean >b : new (x: T) => T } @@ -49,7 +49,7 @@ module GenericParameter { >GenericParameter : typeof GenericParameter function foo5(cb: { new(x: T): string; new(x: number): T }) { ->foo5 : typeof foo5 +>foo5 : (cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; } >T : T >cb : { new (x: T): string; new (x: number): T; } >x : T @@ -73,7 +73,7 @@ module GenericParameter { var r5 = foo5(a); // new{} => string; new(x:number) => {} >r5 : { new (x: boolean): string; new (x: number): boolean; } >foo5(a) : { new (x: boolean): string; new (x: number): boolean; } ->foo5 : typeof foo5 +>foo5 : (cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; } >a : { new (x: boolean): string; new (x: number): boolean; } var b: { new(x: T): string; new(x: number): T; } @@ -88,11 +88,11 @@ module GenericParameter { var r7 = foo5(b); // new any => string; new(x:number) => any >r7 : { new (x: any): string; new (x: number): any; } >foo5(b) : { new (x: any): string; new (x: number): any; } ->foo5 : typeof foo5 +>foo5 : (cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; } >b : { new (x: T): string; new (x: number): T; } function foo6(cb: { new(x: T): string; new(x: T, y?: T): string }) { ->foo6 : typeof foo6 +>foo6 : (cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } >T : T >cb : { new (x: T): string; new (x: T, y?: T): string; } >x : T @@ -109,17 +109,17 @@ module GenericParameter { var r8 = foo6(a); // new{} => string; new(x:{}, y?:{}) => string >r8 : { new (x: {}): string; new (x: {}, y?: {}): string; } >foo6(a) : { new (x: {}): string; new (x: {}, y?: {}): string; } ->foo6 : typeof foo6 +>foo6 : (cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } >a : { new (x: boolean): string; new (x: number): boolean; } var r9 = foo6(b); // new any => string; new(x:any, y?:any) => string >r9 : { new (x: any): string; new (x: any, y?: any): string; } >foo6(b) : { new (x: any): string; new (x: any, y?: any): string; } ->foo6 : typeof foo6 +>foo6 : (cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } >b : { new (x: T): string; new (x: number): T; } function foo7(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) { ->foo7 : typeof foo7 +>foo7 : (x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } >T : T >x : T >T : T @@ -138,7 +138,7 @@ module GenericParameter { var r13 = foo7(1, b); // new any => string; new(x:any, y?:any) => string >r13 : { new (x: any): string; new (x: any, y?: any): string; } >foo7(1, b) : { new (x: any): string; new (x: any, y?: any): string; } ->foo7 : typeof foo7 +>foo7 : (x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } >b : { new (x: T): string; new (x: number): T; } var c: { new (x: T): string; (x: number): T; } @@ -162,12 +162,12 @@ module GenericParameter { var r14 = foo7(1, c); // new any => string; new(x:any, y?:any) => string >r14 : { new (x: any): string; new (x: any, y?: any): string; } >foo7(1, c) : { new (x: any): string; new (x: any, y?: any): string; } ->foo7 : typeof foo7 +>foo7 : (x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } >c : { (x: number): T; new (x: T): string; } var r15 = foo7(1, c2); // new any => string; new(x:any, y?:any) => string >r15 : { new (x: any): string; new (x: any, y?: any): string; } >foo7(1, c2) : { new (x: any): string; new (x: any, y?: any): string; } ->foo7 : typeof foo7 +>foo7 : (x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; } >c2 : { new (x: T): string; new (x: number): T; } } diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types index ecf23d2ead9..ad491206be6 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types @@ -16,7 +16,7 @@ module NonGenericParameter { } function foo4(cb: typeof a) { ->foo4 : typeof foo4 +>foo4 : (cb: { (x: boolean): boolean; (x: string): string; }) => { (x: boolean): boolean; (x: string): string; } >cb : { (x: boolean): boolean; (x: string): string; } >a : { (x: boolean): boolean; (x: string): string; } @@ -27,13 +27,13 @@ module NonGenericParameter { var r = foo4(a); >r : { (x: boolean): boolean; (x: string): string; } >foo4(a) : { (x: boolean): boolean; (x: string): string; } ->foo4 : typeof foo4 +>foo4 : (cb: { (x: boolean): boolean; (x: string): string; }) => { (x: boolean): boolean; (x: string): string; } >a : { (x: boolean): boolean; (x: string): string; } var r2 = foo4((x: T) => x); >r2 : { (x: boolean): boolean; (x: string): string; } >foo4((x: T) => x) : { (x: boolean): boolean; (x: string): string; } ->foo4 : typeof foo4 +>foo4 : (cb: { (x: boolean): boolean; (x: string): string; }) => { (x: boolean): boolean; (x: string): string; } >(x: T) => x : (x: T) => T >T : T >x : T @@ -43,7 +43,7 @@ module NonGenericParameter { var r4 = foo4(x => x); >r4 : { (x: boolean): boolean; (x: string): string; } >foo4(x => x) : { (x: boolean): boolean; (x: string): string; } ->foo4 : typeof foo4 +>foo4 : (cb: { (x: boolean): boolean; (x: string): string; }) => { (x: boolean): boolean; (x: string): string; } >x => x : (x: any) => any >x : any >x : any @@ -53,7 +53,7 @@ module GenericParameter { >GenericParameter : typeof GenericParameter function foo5(cb: { (x: T): string; (x: number): T }) { ->foo5 : typeof foo5 +>foo5 : (cb: { (x: T): string; (x: number): T; }) => { (x: T): string; (x: number): T; } >T : T >cb : { (x: T): string; (x: number): T; } >x : T @@ -68,7 +68,7 @@ module GenericParameter { var r5 = foo5(x => x); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any >r5 : { (x: any): string; (x: number): any; } >foo5(x => x) : { (x: any): string; (x: number): any; } ->foo5 : typeof foo5 +>foo5 : (cb: { (x: T): string; (x: number): T; }) => { (x: T): string; (x: number): T; } >x => x : (x: any) => any >x : any >x : any @@ -85,11 +85,11 @@ module GenericParameter { var r7 = foo5(a); // any => string (+1 overload) >r7 : { (x: any): string; (x: number): any; } >foo5(a) : { (x: any): string; (x: number): any; } ->foo5 : typeof foo5 +>foo5 : (cb: { (x: T): string; (x: number): T; }) => { (x: T): string; (x: number): T; } >a : { (x: T): string; (x: number): T; } function foo6(cb: { (x: T): string; (x: T, y?: T): string }) { ->foo6 : typeof foo6 +>foo6 : (cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >T : T >cb : { (x: T): string; (x: T, y?: T): string; } >x : T @@ -106,7 +106,7 @@ module GenericParameter { var r8 = foo6(x => x); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any >r8 : { (x: any): string; (x: any, y?: any): string; } >foo6(x => x) : { (x: any): string; (x: any, y?: any): string; } ->foo6 : typeof foo6 +>foo6 : (cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >x => x : (x: any) => any >x : any >x : any @@ -114,7 +114,7 @@ module GenericParameter { var r9 = foo6((x: T) => ''); // any => string (+1 overload) >r9 : { (x: any): string; (x: any, y?: any): string; } >foo6((x: T) => '') : { (x: any): string; (x: any, y?: any): string; } ->foo6 : typeof foo6 +>foo6 : (cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >(x: T) => '' : (x: T) => string >T : T >x : T @@ -123,7 +123,7 @@ module GenericParameter { var r11 = foo6((x: T, y?: T) => ''); // any => string (+1 overload) >r11 : { (x: any): string; (x: any, y?: any): string; } >foo6((x: T, y?: T) => '') : { (x: any): string; (x: any, y?: any): string; } ->foo6 : typeof foo6 +>foo6 : (cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >(x: T, y?: T) => '' : (x: T, y?: T) => string >T : T >x : T @@ -132,7 +132,7 @@ module GenericParameter { >T : T function foo7(x:T, cb: { (x: T): string; (x: T, y?: T): string }) { ->foo7 : typeof foo7 +>foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >T : T >x : T >T : T @@ -151,7 +151,7 @@ module GenericParameter { var r12 = foo7(1, (x) => x); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] >r12 : { (x: any): string; (x: any, y?: any): string; } >foo7(1, (x) => x) : { (x: any): string; (x: any, y?: any): string; } ->foo7 : typeof foo7 +>foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >(x) => x : (x: any) => any >x : any >x : any @@ -159,7 +159,7 @@ module GenericParameter { var r13 = foo7(1, (x: T) => ''); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] >r13 : { (x: any): string; (x: any, y?: any): string; } >foo7(1, (x: T) => '') : { (x: any): string; (x: any, y?: any): string; } ->foo7 : typeof foo7 +>foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >(x: T) => '' : (x: T) => string >T : T >x : T @@ -177,6 +177,6 @@ module GenericParameter { var r14 = foo7(1, a); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] >r14 : { (x: any): string; (x: any, y?: any): string; } >foo7(1, a) : { (x: any): string; (x: any, y?: any): string; } ->foo7 : typeof foo7 +>foo7 : (x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; } >a : { (x: T): string; (x: number): T; } } diff --git a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.types b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.types index 87037736eff..68b94d81d02 100644 --- a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.types +++ b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.types @@ -238,7 +238,7 @@ module WithCandidates { >C3 : C3 function other(t: T, u: U) { ->other : typeof other +>other : (t: T, u: U) => void >T : T >U : U >t : T diff --git a/tests/baselines/reference/genericFunctionHasFreshTypeArgs.types b/tests/baselines/reference/genericFunctionHasFreshTypeArgs.types index 23965f161a9..3a3afebb9ac 100644 --- a/tests/baselines/reference/genericFunctionHasFreshTypeArgs.types +++ b/tests/baselines/reference/genericFunctionHasFreshTypeArgs.types @@ -1,6 +1,6 @@ === tests/cases/compiler/genericFunctionHasFreshTypeArgs.ts === function f(p: (x: T) => void) { }; ->f : typeof f +>f : (p: (x: T) => void) => void >p : (x: T) => void >T : T >x : T @@ -8,11 +8,11 @@ function f(p: (x: T) => void) { }; f(x => f(y => x = y)); >f(x => f(y => x = y)) : void ->f : typeof f +>f : (p: (x: T) => void) => void >x => f(y => x = y) : (x: any) => void >x : any >f(y => x = y) : void ->f : typeof f +>f : (p: (x: T) => void) => void >y => x = y : (y: any) => any >y : any >x = y : any diff --git a/tests/baselines/reference/genericFunctionSpecializations1.types b/tests/baselines/reference/genericFunctionSpecializations1.types index 06e2f009bd0..60819c786b8 100644 --- a/tests/baselines/reference/genericFunctionSpecializations1.types +++ b/tests/baselines/reference/genericFunctionSpecializations1.types @@ -1,22 +1,22 @@ === tests/cases/compiler/genericFunctionSpecializations1.ts === function foo3(test: string); // error ->foo3 : typeof foo3 +>foo3 : (test: string) => any >T : T >test : string function foo3(test: T) { } ->foo3 : typeof foo3 +>foo3 : (test: string) => any >T : T >test : T >T : T function foo4(test: string); // valid ->foo4 : typeof foo4 +>foo4 : (test: string) => any >T : T >test : string function foo4(test: T) { } ->foo4 : typeof foo4 +>foo4 : (test: string) => any >T : T >String : String >test : T diff --git a/tests/baselines/reference/genericFunctions0.types b/tests/baselines/reference/genericFunctions0.types index ee435ee0845..045224a7aaa 100644 --- a/tests/baselines/reference/genericFunctions0.types +++ b/tests/baselines/reference/genericFunctions0.types @@ -1,6 +1,6 @@ === tests/cases/compiler/genericFunctions0.ts === function foo (x: T) { return x; } ->foo : typeof foo +>foo : (x: T) => T >T : T >x : T >T : T @@ -9,5 +9,5 @@ function foo (x: T) { return x; } var x = foo(5); // 'x' should be number >x : number >foo(5) : number ->foo : typeof foo +>foo : (x: T) => T diff --git a/tests/baselines/reference/genericFunctions1.types b/tests/baselines/reference/genericFunctions1.types index 96862e9e0cb..aed264c78e1 100644 --- a/tests/baselines/reference/genericFunctions1.types +++ b/tests/baselines/reference/genericFunctions1.types @@ -1,6 +1,6 @@ === tests/cases/compiler/genericFunctions1.ts === function foo (x: T) { return x; } ->foo : typeof foo +>foo : (x: T) => T >T : T >x : T >T : T @@ -9,5 +9,5 @@ function foo (x: T) { return x; } var x = foo(5); // 'x' should be number >x : number >foo(5) : number ->foo : typeof foo +>foo : (x: T) => T diff --git a/tests/baselines/reference/genericFunctions2.types b/tests/baselines/reference/genericFunctions2.types index 2ad353559a5..96e757d3d9e 100644 --- a/tests/baselines/reference/genericFunctions2.types +++ b/tests/baselines/reference/genericFunctions2.types @@ -1,6 +1,6 @@ === tests/cases/compiler/genericFunctions2.ts === declare function map (items: T[], f: (x: T) => U): U[]; ->map : typeof map +>map : (items: T[], f: (x: T) => U) => U[] >T : T >U : U >items : T[] @@ -17,7 +17,7 @@ var myItems: string[]; var lengths = map(myItems, x => x.length); >lengths : number[] >map(myItems, x => x.length) : number[] ->map : typeof map +>map : (items: T[], f: (x: T) => U) => U[] >myItems : string[] >x => x.length : (x: string) => number >x : string diff --git a/tests/baselines/reference/genericFunctions3.types b/tests/baselines/reference/genericFunctions3.types index 663f6270f2a..2215e30adcf 100644 --- a/tests/baselines/reference/genericFunctions3.types +++ b/tests/baselines/reference/genericFunctions3.types @@ -11,14 +11,14 @@ interface Query { } function from(arg: boolean): Query; // was Error: Overload signature is not compatible with function definition. ->from : typeof from +>from : (arg: boolean) => Query >T : T >arg : boolean >Query : Query >T : T function from(arg: any): Query { ->from : typeof from +>from : (arg: boolean) => Query >T : T >arg : any >Query : Query diff --git a/tests/baselines/reference/genericInference2.types b/tests/baselines/reference/genericInference2.types index d9e0bb14ceb..2616c0de2c4 100644 --- a/tests/baselines/reference/genericInference2.types +++ b/tests/baselines/reference/genericInference2.types @@ -24,7 +24,7 @@ >T : T } export function observable(value: T): Observable; ->observable : typeof observable +>observable : (value: T) => Observable >T : T >value : T >T : T @@ -38,16 +38,16 @@ name: ko.observable("Bob"), >name : ko.Observable >ko.observable("Bob") : ko.Observable ->ko.observable : typeof ko.observable +>ko.observable : (value: T) => ko.Observable >ko : typeof ko ->observable : typeof ko.observable +>observable : (value: T) => ko.Observable age: ko.observable(37) >age : ko.Observable >ko.observable(37) : ko.Observable ->ko.observable : typeof ko.observable +>ko.observable : (value: T) => ko.Observable >ko : typeof ko ->observable : typeof ko.observable +>observable : (value: T) => ko.Observable }; var x_v = o.name().length; // should be 'number' diff --git a/tests/baselines/reference/genericInstantiationEquivalentToObjectLiteral.types b/tests/baselines/reference/genericInstantiationEquivalentToObjectLiteral.types index aa67bfdf7bb..449c5712c6c 100644 --- a/tests/baselines/reference/genericInstantiationEquivalentToObjectLiteral.types +++ b/tests/baselines/reference/genericInstantiationEquivalentToObjectLiteral.types @@ -28,7 +28,7 @@ y = x; >x : Pair declare function f(x: Pair); ->f : typeof f +>f : (x: Pair) => any >T : T >U : U >x : Pair @@ -37,7 +37,7 @@ declare function f(x: Pair); >U : U declare function f2(x: { first: T; second: U; }); ->f2 : typeof f2 +>f2 : (x: { first: T; second: U; }) => any >T : T >U : U >x : { first: T; second: U; } @@ -48,21 +48,21 @@ declare function f2(x: { first: T; second: U; }); f(x); >f(x) : any ->f : typeof f +>f : (x: Pair) => any >x : Pair f(y); >f(y) : any ->f : typeof f +>f : (x: Pair) => any >y : { first: string; second: number; } f2(x); >f2(x) : any ->f2 : typeof f2 +>f2 : (x: { first: T; second: U; }) => any >x : Pair f2(y); >f2(y) : any ->f2 : typeof f2 +>f2 : (x: { first: T; second: U; }) => any >y : { first: string; second: number; } diff --git a/tests/baselines/reference/genericInterfaceFunctionTypeParameter.types b/tests/baselines/reference/genericInterfaceFunctionTypeParameter.types index f8d1ff0341d..f262fda55f6 100644 --- a/tests/baselines/reference/genericInterfaceFunctionTypeParameter.types +++ b/tests/baselines/reference/genericInterfaceFunctionTypeParameter.types @@ -4,7 +4,7 @@ export interface IFoo { } >A : A export function foo(fn: (ifoo: IFoo) => void) { ->foo : typeof foo +>foo : (fn: (ifoo: IFoo) => void) => void >A : A >fn : (ifoo: IFoo) => void >ifoo : IFoo @@ -13,7 +13,7 @@ export function foo(fn: (ifoo: IFoo) => void) { foo(fn); // Invocation is necessary to repro (!) >foo(fn) : void ->foo : typeof foo +>foo : (fn: (ifoo: IFoo) => void) => void >fn : (ifoo: IFoo) => void } diff --git a/tests/baselines/reference/genericOverloadSignatures.types b/tests/baselines/reference/genericOverloadSignatures.types index 1181d61ccb7..e1efe0785ab 100644 --- a/tests/baselines/reference/genericOverloadSignatures.types +++ b/tests/baselines/reference/genericOverloadSignatures.types @@ -14,19 +14,19 @@ interface A { } function f(a: T); ->f : typeof f +>f : { (a: T): any; (a: T): any; } >T : T >a : T >T : T function f(a: T); ->f : typeof f +>f : { (a: T): any; (a: T): any; } >T : T >a : T >T : T function f(a) { } ->f : typeof f +>f : { (a: T): any; (a: T): any; } >a : any interface I2 { diff --git a/tests/baselines/reference/genericParameterAssignability1.types b/tests/baselines/reference/genericParameterAssignability1.types index ac7f1c97436..b7888014dea 100644 --- a/tests/baselines/reference/genericParameterAssignability1.types +++ b/tests/baselines/reference/genericParameterAssignability1.types @@ -1,6 +1,6 @@ === tests/cases/compiler/genericParameterAssignability1.ts === function f(x: T): T { return null; } ->f : typeof f +>f : (x: T) => T >T : T >x : T >T : T @@ -15,7 +15,7 @@ var r = (x: T) => x; >x : T r = f; // should be allowed ->r = f : typeof f +>r = f : (x: T) => T >r : (x: T) => T ->f : typeof f +>f : (x: T) => T diff --git a/tests/baselines/reference/genericTypeParameterEquivalence2.types b/tests/baselines/reference/genericTypeParameterEquivalence2.types index 2c7af15b753..09e13b12f7b 100644 --- a/tests/baselines/reference/genericTypeParameterEquivalence2.types +++ b/tests/baselines/reference/genericTypeParameterEquivalence2.types @@ -1,7 +1,7 @@ === tests/cases/compiler/genericTypeParameterEquivalence2.ts === // compose :: (b->c) -> (a->b) -> (a->c) function compose(f: (b: B) => C, g: (a:A) => B): (a:A) => C { ->compose : typeof compose +>compose : (f: (b: B) => C, g: (a: A) => B) => (a: A) => C >A : A >B : B >C : C @@ -37,7 +37,7 @@ function compose(f: (b: B) => C, g: (a:A) => B): (a:A) => C { // forEach :: [a] -> (a -> ()) -> () function forEach(list: A[], f: (a: A, n?: number) => void ): void { ->forEach : typeof forEach +>forEach : (list: A[], f: (a: A, n?: number) => void) => void >A : A >list : A[] >A : A @@ -68,7 +68,7 @@ function forEach(list: A[], f: (a: A, n?: number) => void ): void { // filter :: (a->bool) -> [a] -> [a] function filter(f: (a: A) => boolean, ar: A[]): A[] { ->filter : typeof filter +>filter : (f: (a: A) => boolean, ar: A[]) => A[] >A : A >f : (a: A) => boolean >a : A @@ -83,7 +83,7 @@ function filter(f: (a: A) => boolean, ar: A[]): A[] { forEach(ar, (el) => { >forEach(ar, (el) => { if (f(el)) { ret.push(el); } } ) : void ->forEach : typeof forEach +>forEach : (list: A[], f: (a: A, n?: number) => void) => void >ar : A[] >(el) => { if (f(el)) { ret.push(el); } } : (el: A) => void >el : A @@ -108,7 +108,7 @@ function filter(f: (a: A) => boolean, ar: A[]): A[] { // length :: [a] -> Num function length2(ar: A[]): number { ->length2 : typeof length2 +>length2 : (ar: A[]) => number >A : A >ar : A[] >A : A @@ -121,7 +121,7 @@ function length2(ar: A[]): number { // curry1 :: ((a,b)->c) -> (a->(b->c)) function curry1(f: (a: A, b: B) => C): (ax: A) => (bx: B) => C { ->curry1 : typeof curry1 +>curry1 : (f: (a: A, b: B) => C) => (ax: A) => (bx: B) => C >A : A >B : B >C : C @@ -160,8 +160,8 @@ function curry1(f: (a: A, b: B) => C): (ax: A) => (bx: B) => C { var cfilter = curry1(filter); >cfilter : (ax: {}) => (bx: {}) => {}[] >curry1(filter) : (ax: {}) => (bx: {}) => {}[] ->curry1 : typeof curry1 ->filter : typeof filter +>curry1 : (f: (a: A, b: B) => C) => (ax: A) => (bx: B) => C +>filter : (f: (a: A) => boolean, ar: A[]) => A[] // compose :: (b->c) -> (a->b) -> (a->c) // length :: [a] -> Num @@ -172,7 +172,7 @@ var cfilter = curry1(filter); // countWhere :: (a -> Bool) -> [a] -> Num function countWhere_1(pred: (a: A) => boolean): (a: A[]) => number { ->countWhere_1 : typeof countWhere_1 +>countWhere_1 : (pred: (a: A) => boolean) => (a: A[]) => number >A : A >pred : (a: A) => boolean >a : A @@ -182,15 +182,15 @@ function countWhere_1(pred: (a: A) => boolean): (a: A[]) => number { return compose(length2, cfilter(pred)); >compose(length2, cfilter(pred)) : (a: {}) => number ->compose : typeof compose ->length2 : typeof length2 +>compose : (f: (b: B) => C, g: (a: A) => B) => (a: A) => C +>length2 : (ar: A[]) => number >cfilter(pred) : (bx: {}) => {}[] >cfilter : (ax: {}) => (bx: {}) => {}[] >pred : (a: A) => boolean } function countWhere_2(pred: (a: A) => boolean): (a: A[]) => number { ->countWhere_2 : typeof countWhere_2 +>countWhere_2 : (pred: (a: A) => boolean) => (a: A[]) => number >A : A >pred : (a: A) => boolean >a : A @@ -206,7 +206,7 @@ function countWhere_2(pred: (a: A) => boolean): (a: A[]) => number { return compose(length2, where); >compose(length2, where) : (a: {}) => number ->compose : typeof compose ->length2 : typeof length2 +>compose : (f: (b: B) => C, g: (a: A) => B) => (a: A) => C +>length2 : (ar: A[]) => number >where : (bx: {}) => {}[] } diff --git a/tests/baselines/reference/genericTypeWithCallableMembers2.types b/tests/baselines/reference/genericTypeWithCallableMembers2.types index a0b6ec0e8a5..5c265e30a85 100644 --- a/tests/baselines/reference/genericTypeWithCallableMembers2.types +++ b/tests/baselines/reference/genericTypeWithCallableMembers2.types @@ -1,6 +1,6 @@ === tests/cases/compiler/genericTypeWithCallableMembers2.ts === function foo1(f: T) { ->foo1 : typeof foo1 +>foo1 : string>(f: T) => string >T : T >f : T >T : T @@ -11,7 +11,7 @@ function foo1(f: T) { } function foo2(f: T) { ->foo2 : typeof foo2 +>foo2 : string>(f: T) => string >T : T >f : T >T : T diff --git a/tests/baselines/reference/genericsManyTypeParameters.types b/tests/baselines/reference/genericsManyTypeParameters.types index 21ed88b2013..65f9a7c115e 100644 --- a/tests/baselines/reference/genericsManyTypeParameters.types +++ b/tests/baselines/reference/genericsManyTypeParameters.types @@ -1,6 +1,6 @@ === tests/cases/compiler/genericsManyTypeParameters.ts === function Foo< ->Foo : typeof Foo +>Foo : (x1: a1, y1: a21, z1: a31, a1: a41, b1: a51, c1: a61, x2: a119, y2: a22, z2: a32, a2: a42, b2: a52, c2: a62, x3: a219, y3: a23, z3: a33, a3: a43, b3: a53, c3: a63, x4: a319, y4: a24, z4: a34, a4: a44, b4: a54, c4: a64, x5: a419, y5: a25, z5: a35, a5: a45, b5: a55, c5: a65, x6: a519, y6: a26, z6: a36, a6: a46, b6: a56, c6: a66, x7: a619, y7: a27, z7: a37, a7: a47, b7: a57, c7: a67, x8: a71, y8: a28, z8: a38, a8: a48, b8: a58, c8: a68, x9: a81, y9: a29, z9: a39, a9: a49, b9: a59, c9: a69, x10: a91, y12: a210, z10: a310, a10: a410, b10: a510, c10: a610, x11: a111, y13: a211, z11: a311, a11: a411, b11: a511, c11: a611, x12: a112, y14: a212, z12: a312, a12: a412, b12: a512, c12: a612, x13: a113, y15: a213, z13: a313, a13: a413, b13: a513, c13: a613, x14: a114, y16: a214, z14: a314, a14: a414, b14: a514, c14: a614, x15: a115, y17: a215, z15: a315, a15: a415, b15: a515, c15: a615, x16: a116, y18: a216, z16: a316, a16: a416, b16: a516, c16: a616, x17: a117, y19: a217, z17: a317, a17: a417, b17: a517, c17: a617, x18: a118, y10: a218, z18: a318, a18: a418, b18: a518, c18: a618) => {}[] a1, a21, a31, a41, a51, a61, >a1 : a1 diff --git a/tests/baselines/reference/getterSetterNonAccessor.types b/tests/baselines/reference/getterSetterNonAccessor.types index 569d4a303b7..d0b925f99e0 100644 --- a/tests/baselines/reference/getterSetterNonAccessor.types +++ b/tests/baselines/reference/getterSetterNonAccessor.types @@ -1,9 +1,9 @@ === tests/cases/compiler/getterSetterNonAccessor.ts === function getFunc():any{return 0;} ->getFunc : typeof getFunc +>getFunc : () => any function setFunc(v){} ->setFunc : typeof setFunc +>setFunc : (v: any) => void >v : any Object.defineProperty({}, "0", ({ @@ -14,16 +14,16 @@ Object.defineProperty({}, "0", ({ >{} : {} >({ get: getFunc, set: setFunc, configurable: true }) : PropertyDescriptor >PropertyDescriptor : PropertyDescriptor ->({ get: getFunc, set: setFunc, configurable: true }) : { get: typeof getFunc; set: typeof setFunc; configurable: boolean; } ->{ get: getFunc, set: setFunc, configurable: true } : { get: typeof getFunc; set: typeof setFunc; configurable: boolean; } +>({ get: getFunc, set: setFunc, configurable: true }) : { get: () => any; set: (v: any) => void; configurable: boolean; } +>{ get: getFunc, set: setFunc, configurable: true } : { get: () => any; set: (v: any) => void; configurable: boolean; } get: getFunc, ->get : typeof getFunc ->getFunc : typeof getFunc +>get : () => any +>getFunc : () => any set: setFunc, ->set : typeof setFunc ->setFunc : typeof setFunc +>set : (v: any) => void +>setFunc : (v: any) => void configurable: true >configurable : boolean diff --git a/tests/baselines/reference/global.types b/tests/baselines/reference/global.types index 568c88297b0..86d5dd3c986 100644 --- a/tests/baselines/reference/global.types +++ b/tests/baselines/reference/global.types @@ -3,7 +3,7 @@ module M { >M : typeof M export function f(y:number) { ->f : typeof f +>f : (y: number) => number >y : number return x+y; @@ -18,8 +18,8 @@ var x=10; M.f(3); >M.f(3) : number ->M.f : typeof M.f +>M.f : (y: number) => number >M : typeof M ->f : typeof M.f +>f : (y: number) => number diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.types b/tests/baselines/reference/heterogeneousArrayLiterals.types index cd6cf3a06f7..81770731633 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.types +++ b/tests/baselines/reference/heterogeneousArrayLiterals.types @@ -237,7 +237,7 @@ module WithContextualType { } function foo(t: T, u: U) { ->foo : typeof foo +>foo : (t: T, u: U) => void >T : T >U : U >t : T @@ -286,7 +286,7 @@ function foo(t: T, u: U) { } function foo2(t: T, u: U) { ->foo2 : typeof foo2 +>foo2 : (t: T, u: U) => void >T : T >Base : Base >U : U @@ -361,7 +361,7 @@ function foo2(t: T, u: U) { } function foo3(t: T, u: U) { ->foo3 : typeof foo3 +>foo3 : (t: T, u: U) => void >T : T >Derived : Derived >U : U @@ -436,7 +436,7 @@ function foo3(t: T, u: U) { } function foo4(t: T, u: U) { ->foo4 : typeof foo4 +>foo4 : (t: T, u: U) => void >T : T >Base : Base >U : U diff --git a/tests/baselines/reference/icomparable.types b/tests/baselines/reference/icomparable.types index 5281ff73e3c..2766743f41f 100644 --- a/tests/baselines/reference/icomparable.types +++ b/tests/baselines/reference/icomparable.types @@ -10,7 +10,7 @@ } declare function sort>(items: U[]): U[]; ->sort : typeof sort +>sort : >(items: U[]) => U[] >U : U >IComparable : IComparable >items : U[] @@ -29,6 +29,6 @@ var x = sort(sc); >x : StringComparable[] >sort(sc) : StringComparable[] ->sort : typeof sort +>sort : >(items: U[]) => U[] >sc : StringComparable[] diff --git a/tests/baselines/reference/idInProp.types b/tests/baselines/reference/idInProp.types index 8227b6fe2c4..f300be6ebf2 100644 --- a/tests/baselines/reference/idInProp.types +++ b/tests/baselines/reference/idInProp.types @@ -1,6 +1,6 @@ === tests/cases/compiler/idInProp.ts === function f() { ->f : typeof f +>f : () => void var t: { (f: any) : any; }; >t : (f: any) => any diff --git a/tests/baselines/reference/ifDoWhileStatements.types b/tests/baselines/reference/ifDoWhileStatements.types index b488b6c6fc0..b4a3f7a70af 100644 --- a/tests/baselines/reference/ifDoWhileStatements.types +++ b/tests/baselines/reference/ifDoWhileStatements.types @@ -46,11 +46,11 @@ class D{ } function F(x: string): number { return 42; } ->F : typeof F +>F : (x: string) => number >x : string function F2(x: number): boolean { return x < 42; } ->F2 : typeof F2 +>F2 : (x: number) => boolean >x : number >x < 42 : boolean >x : number @@ -66,7 +66,7 @@ module M { } export function F2(x: number): string { return x.toString(); } ->F2 : typeof F2 +>F2 : (x: number) => string >x : number >x.toString() : string >x.toString : (radix?: number) => string @@ -85,7 +85,7 @@ module N { } export function F2(x: number): string { return x.toString(); } ->F2 : typeof F2 +>F2 : (x: number) => string >x : number >x.toString() : string >x.toString : (radix?: number) => string @@ -346,30 +346,30 @@ do { }while(k) >k : { x: number; y: string; } function fn(x?: string): I { return null; } ->fn : typeof fn +>fn : (x?: string) => I >x : string >I : I if (fn()) { } >fn() : I ->fn : typeof fn +>fn : (x?: string) => I while (fn()) { } >fn() : I ->fn : typeof fn +>fn : (x?: string) => I do { }while(fn()) >fn() : I ->fn : typeof fn +>fn : (x?: string) => I if (fn) { } ->fn : typeof fn +>fn : (x?: string) => I while (fn) { } ->fn : typeof fn +>fn : (x?: string) => I do { }while(fn) ->fn : typeof fn +>fn : (x?: string) => I diff --git a/tests/baselines/reference/implicitAnyAnyReturningFunction.types b/tests/baselines/reference/implicitAnyAnyReturningFunction.types index e084498ccec..1f0b81c724f 100644 --- a/tests/baselines/reference/implicitAnyAnyReturningFunction.types +++ b/tests/baselines/reference/implicitAnyAnyReturningFunction.types @@ -1,13 +1,13 @@ === tests/cases/compiler/implicitAnyAnyReturningFunction.ts === function A() { ->A : typeof A +>A : () => any return ""; >"" : any } function B() { ->B : typeof B +>B : () => any var someLocal: any = {}; >someLocal : any diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType2.types b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType2.types index 9c5264bb029..9fd971ab862 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType2.types +++ b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType2.types @@ -1,7 +1,7 @@ === tests/cases/compiler/implicitAnyDeclareFunctionWithoutFormalType2.ts === // generates function fn1(): number; function fn1() { ->fn1 : typeof fn1 +>fn1 : () => number var x: number; >x : number @@ -11,7 +11,7 @@ function fn1() { } // generates function fn2(): any; function fn2(): any { ->fn2 : typeof fn2 +>fn2 : () => any var x: any; >x : any @@ -21,7 +21,7 @@ function fn2(): any { } // generates function fn3(); function fn3() { ->fn3 : typeof fn3 +>fn3 : () => any var x: any; >x : any diff --git a/tests/baselines/reference/implicitAnyGenerics.types b/tests/baselines/reference/implicitAnyGenerics.types index b3744097d33..91a231e3f12 100644 --- a/tests/baselines/reference/implicitAnyGenerics.types +++ b/tests/baselines/reference/implicitAnyGenerics.types @@ -67,17 +67,17 @@ var d5: D = new D(null); >D : typeof D function foo(): T { return null; }; ->foo : typeof foo +>foo : () => T >T : T >T : T foo() >foo() : {} ->foo : typeof foo +>foo : () => T foo(); >foo() : any ->foo : typeof foo +>foo : () => T diff --git a/tests/baselines/reference/importDecl.types b/tests/baselines/reference/importDecl.types index c961a58e7de..973729ae050 100644 --- a/tests/baselines/reference/importDecl.types +++ b/tests/baselines/reference/importDecl.types @@ -22,9 +22,9 @@ export var d4 = m4.d; export var f4 = m4.foo(); >f4 : m4.d >m4.foo() : m4.d ->m4.foo : typeof m4.foo +>m4.foo : () => m4.d >m4 : typeof m4 ->foo : typeof m4.foo +>foo : () => m4.d export module m1 { >m1 : typeof m1 @@ -44,9 +44,9 @@ export module m1 { export var f2 = m4.foo(); >f2 : m4.d >m4.foo() : m4.d ->m4.foo : typeof m4.foo +>m4.foo : () => m4.d >m4 : typeof m4 ->foo : typeof m4.foo +>foo : () => m4.d var x3 = m4.x; >x3 : m4.d @@ -63,9 +63,9 @@ export module m1 { var f3 = m4.foo(); >f3 : m4.d >m4.foo() : m4.d ->m4.foo : typeof m4.foo +>m4.foo : () => m4.d >m4 : typeof m4 ->foo : typeof m4.foo +>foo : () => m4.d } //Emit global only usage @@ -81,9 +81,9 @@ export var useGlo_m4_d4 = glo_m4.d; export var useGlo_m4_f4 = glo_m4.foo(); >useGlo_m4_f4 : glo_m4.d >glo_m4.foo() : glo_m4.d ->glo_m4.foo : typeof glo_m4.foo +>glo_m4.foo : () => glo_m4.d >glo_m4 : typeof glo_m4 ->foo : typeof glo_m4.foo +>foo : () => glo_m4.d //Emit even when used just in function type import fncOnly_m4 = require("importDecl_require2"); @@ -92,9 +92,9 @@ import fncOnly_m4 = require("importDecl_require2"); export var useFncOnly_m4_f4 = fncOnly_m4.foo(); >useFncOnly_m4_f4 : fncOnly_m4.d >fncOnly_m4.foo() : fncOnly_m4.d ->fncOnly_m4.foo : typeof fncOnly_m4.foo +>fncOnly_m4.foo : () => fncOnly_m4.d >fncOnly_m4 : typeof fncOnly_m4 ->foo : typeof fncOnly_m4.foo +>foo : () => fncOnly_m4.d // only used privately no need to emit import private_m4 = require("importDecl_require3"); @@ -118,9 +118,9 @@ export module usePrivate_m4_m1 { var f3 = private_m4.foo(); >f3 : private_m4.d >private_m4.foo() : private_m4.d ->private_m4.foo : typeof private_m4.foo +>private_m4.foo : () => private_m4.d >private_m4 : typeof private_m4 ->foo : typeof private_m4.foo +>foo : () => private_m4.d } // Do not emit unused import @@ -130,9 +130,9 @@ import m5 = require("importDecl_require4"); export var d = m5.foo2(); >d : m4.d >m5.foo2() : m4.d ->m5.foo2 : typeof m5.foo2 +>m5.foo2 : () => m4.d >m5 : typeof m5 ->foo2 : typeof m5.foo2 +>foo2 : () => m4.d // Do not emit multiple used import statements import multiImport_m4 = require("importDecl_require"); // Emit used @@ -153,9 +153,9 @@ export var useMultiImport_m4_d4 = multiImport_m4.d; export var useMultiImport_m4_f4 = multiImport_m4.foo(); >useMultiImport_m4_f4 : m4.d >multiImport_m4.foo() : m4.d ->multiImport_m4.foo : typeof m4.foo +>multiImport_m4.foo : () => m4.d >multiImport_m4 : typeof m4 ->foo : typeof m4.foo +>foo : () => m4.d === tests/cases/compiler/importDecl_require.ts === export class d { @@ -169,7 +169,7 @@ export var x: d; >d : d export function foo(): d { return null; } ->foo : typeof foo +>foo : () => d >d : d === tests/cases/compiler/importDecl_require1.ts === @@ -184,7 +184,7 @@ var x: d; >d : d export function foo(): d { return null; } ->foo : typeof foo +>foo : () => d >d : d === tests/cases/compiler/importDecl_require2.ts === @@ -199,7 +199,7 @@ export var x: d; >d : d export function foo(): d { return null; } ->foo : typeof foo +>foo : () => d >d : d === tests/cases/compiler/importDecl_require3.ts === @@ -214,7 +214,7 @@ export var x: d; >d : d export function foo(): d { return null; } ->foo : typeof foo +>foo : () => d >d : d === tests/cases/compiler/importDecl_require4.ts === @@ -222,7 +222,7 @@ import m4 = require("importDecl_require"); >m4 : typeof m4 export function foo2(): m4.d { return null; } ->foo2 : typeof foo2 +>foo2 : () => m4.d >m4 : unknown >d : m4.d diff --git a/tests/baselines/reference/importStatements.types b/tests/baselines/reference/importStatements.types index 68038e93a5b..5980a142f34 100644 --- a/tests/baselines/reference/importStatements.types +++ b/tests/baselines/reference/importStatements.types @@ -73,7 +73,7 @@ module E { >A : typeof a export function xDist(x: a.Point) { ->xDist : typeof xDist +>xDist : (x: a.Point) => number >x : a.Point >a : unknown >Point : a.Point diff --git a/tests/baselines/reference/inOperatorWithValidOperands.types b/tests/baselines/reference/inOperatorWithValidOperands.types index f2c4d903d1d..f621c3bf55d 100644 --- a/tests/baselines/reference/inOperatorWithValidOperands.types +++ b/tests/baselines/reference/inOperatorWithValidOperands.types @@ -56,7 +56,7 @@ var rb2 = x in {}; >{} : {} function foo(t: T) { ->foo : typeof foo +>foo : (t: T) => void >T : T >t : T >T : T diff --git a/tests/baselines/reference/indexSignaturesInferentialTyping.types b/tests/baselines/reference/indexSignaturesInferentialTyping.types index a59c8e930ea..3c16db3a2bf 100644 --- a/tests/baselines/reference/indexSignaturesInferentialTyping.types +++ b/tests/baselines/reference/indexSignaturesInferentialTyping.types @@ -1,6 +1,6 @@ === tests/cases/compiler/indexSignaturesInferentialTyping.ts === function foo(items: { [index: number]: T }): T { return undefined; } ->foo : typeof foo +>foo : (items: { [x: number]: T; }) => T >T : T >items : { [x: number]: T; } >index : number @@ -9,7 +9,7 @@ function foo(items: { [index: number]: T }): T { return undefined; } >undefined : undefined function bar(items: { [index: string]: T }): T { return undefined; } ->bar : typeof bar +>bar : (items: { [x: string]: T; }) => T >T : T >items : { [x: string]: T; } >index : string @@ -20,13 +20,13 @@ function bar(items: { [index: string]: T }): T { return undefined; } var x1 = foo({ 0: 0, 1: 1 }); // type should be number >x1 : number >foo({ 0: 0, 1: 1 }) : number ->foo : typeof foo +>foo : (items: { [x: number]: T; }) => T >{ 0: 0, 1: 1 } : { [x: number]: number; 0: number; 1: number; } var x2 = foo({ zero: 0, one: 1 }); >x2 : {} >foo({ zero: 0, one: 1 }) : {} ->foo : typeof foo +>foo : (items: { [x: number]: T; }) => T >{ zero: 0, one: 1 } : { [x: number]: {}; zero: number; one: number; } >zero : number >one : number @@ -34,13 +34,13 @@ var x2 = foo({ zero: 0, one: 1 }); var x3 = bar({ 0: 0, 1: 1 }); >x3 : number >bar({ 0: 0, 1: 1 }) : number ->bar : typeof bar +>bar : (items: { [x: string]: T; }) => T >{ 0: 0, 1: 1 } : { [x: string]: number; 0: number; 1: number; } var x4 = bar({ zero: 0, one: 1 }); // type should be number >x4 : number >bar({ zero: 0, one: 1 }) : number ->bar : typeof bar +>bar : (items: { [x: string]: T; }) => T >{ zero: 0, one: 1 } : { [x: string]: number; zero: number; one: number; } >zero : number >one : number diff --git a/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.types b/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.types index 3f985ac3413..5bf41c64b24 100644 --- a/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.types +++ b/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.types @@ -1,25 +1,25 @@ === tests/cases/compiler/inferTypeArgumentsInSignatureWithRestParameters.ts === function f(array: T[], ...args) { } ->f : typeof f +>f : (array: T[], ...args: any[]) => void >T : T >array : T[] >T : T >args : any[] function g(array: number[], ...args) { } ->g : typeof g +>g : (array: number[], ...args: any[]) => void >array : number[] >args : any[] function h(nonarray: T, ...args) { } ->h : typeof h +>h : (nonarray: T, ...args: any[]) => void >T : T >nonarray : T >T : T >args : any[] function i(array: T[], opt?: any[]) { } ->i : typeof i +>i : (array: T[], opt?: any[]) => void >T : T >array : T[] >T : T @@ -31,21 +31,21 @@ var a = [1, 2, 3, 4, 5]; f(a); // OK >f(a) : void ->f : typeof f +>f : (array: T[], ...args: any[]) => void >a : number[] g(a); // OK >g(a) : void ->g : typeof g +>g : (array: number[], ...args: any[]) => void >a : number[] h(a); // OK >h(a) : void ->h : typeof h +>h : (nonarray: T, ...args: any[]) => void >a : number[] i(a); // OK >i(a) : void ->i : typeof i +>i : (array: T[], opt?: any[]) => void >a : number[] diff --git a/tests/baselines/reference/inferentialTypingWithFunctionType.types b/tests/baselines/reference/inferentialTypingWithFunctionType.types index 44312c331f7..9f1986c49ea 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionType.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionType.types @@ -1,6 +1,6 @@ === tests/cases/compiler/inferentialTypingWithFunctionType.ts === declare function map(x: T, f: (s: T) => U): U; ->map : typeof map +>map : (x: T, f: (s: T) => U) => U >T : T >U : U >x : T @@ -12,7 +12,7 @@ declare function map(x: T, f: (s: T) => U): U; >U : U declare function identity(y: V): V; ->identity : typeof identity +>identity : (y: V) => V >V : V >y : V >V : V @@ -21,6 +21,6 @@ declare function identity(y: V): V; var s = map("", identity); >s : string >map("", identity) : string ->map : typeof map ->identity : typeof identity +>map : (x: T, f: (s: T) => U) => U +>identity : (y: V) => V diff --git a/tests/baselines/reference/inferentialTypingWithFunctionType2.types b/tests/baselines/reference/inferentialTypingWithFunctionType2.types index 81b74406ae2..a97bf2ab36c 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionType2.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionType2.types @@ -1,6 +1,6 @@ === tests/cases/compiler/inferentialTypingWithFunctionType2.ts === function identity(a: A): A { ->identity : typeof identity +>identity : (a: A) => A >A : A >a : A >A : A @@ -16,5 +16,5 @@ var x = [1, 2, 3].map(identity)[0]; >[1, 2, 3].map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >[1, 2, 3] : number[] >map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] ->identity : typeof identity +>identity : (a: A) => A diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types index 6f50f04bd6d..0596081ade3 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types @@ -1,6 +1,6 @@ === tests/cases/compiler/inferentialTypingWithFunctionTypeNested.ts === declare function map(x: T, f: () => { x: (s: T) => U }): U; ->map : typeof map +>map : (x: T, f: () => { x: (s: T) => U; }) => U >T : T >U : U >x : T @@ -13,7 +13,7 @@ declare function map(x: T, f: () => { x: (s: T) => U }): U; >U : U declare function identity(y: V): V; ->identity : typeof identity +>identity : (y: V) => V >V : V >y : V >V : V @@ -22,9 +22,9 @@ declare function identity(y: V): V; var s = map("", () => { return { x: identity }; }); >s : any >map("", () => { return { x: identity }; }) : any ->map : typeof map ->() => { return { x: identity }; } : () => { x: typeof identity; } ->{ x: identity } : { x: typeof identity; } ->x : typeof identity ->identity : typeof identity +>map : (x: T, f: () => { x: (s: T) => U; }) => U +>() => { return { x: identity }; } : () => { x: (y: V) => V; } +>{ x: identity } : { x: (y: V) => V; } +>x : (y: V) => V +>identity : (y: V) => V diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.types b/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.types index b8754ee1a1d..115da50176f 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.types @@ -1,6 +1,6 @@ === tests/cases/compiler/inferentialTypingWithFunctionTypeSyntacticScenarios.ts === declare function map(array: T, func: (x: T) => U): U; ->map : typeof map +>map : (array: T, func: (x: T) => U) => U >T : T >U : U >array : T @@ -12,7 +12,7 @@ declare function map(array: T, func: (x: T) => U): U; >U : U declare function identity(y: V): V; ->identity : typeof identity +>identity : (y: V) => V >V : V >y : V >V : V @@ -23,46 +23,46 @@ var s: string; // dotted name var dottedIdentity = { x: identity }; ->dottedIdentity : { x: typeof identity; } ->{ x: identity } : { x: typeof identity; } ->x : typeof identity ->identity : typeof identity +>dottedIdentity : { x: (y: V) => V; } +>{ x: identity } : { x: (y: V) => V; } +>x : (y: V) => V +>identity : (y: V) => V s = map("", dottedIdentity.x); >s = map("", dottedIdentity.x) : string >s : string >map("", dottedIdentity.x) : string ->map : typeof map ->dottedIdentity.x : typeof identity ->dottedIdentity : { x: typeof identity; } ->x : typeof identity +>map : (array: T, func: (x: T) => U) => U +>dottedIdentity.x : (y: V) => V +>dottedIdentity : { x: (y: V) => V; } +>x : (y: V) => V // index expression s = map("", dottedIdentity['x']); >s = map("", dottedIdentity['x']) : string >s : string >map("", dottedIdentity['x']) : string ->map : typeof map ->dottedIdentity['x'] : typeof identity ->dottedIdentity : { x: typeof identity; } +>map : (array: T, func: (x: T) => U) => U +>dottedIdentity['x'] : (y: V) => V +>dottedIdentity : { x: (y: V) => V; } // function call s = map("", (() => identity)()); >s = map("", (() => identity)()) : string >s : string >map("", (() => identity)()) : string ->map : typeof map ->(() => identity)() : typeof identity ->(() => identity) : () => typeof identity ->() => identity : () => typeof identity ->identity : typeof identity +>map : (array: T, func: (x: T) => U) => U +>(() => identity)() : (y: V) => V +>(() => identity) : () => (y: V) => V +>() => identity : () => (y: V) => V +>identity : (y: V) => V // construct interface IdentityConstructor { >IdentityConstructor : IdentityConstructor new (): typeof identity; ->identity : typeof identity +>identity : (y: V) => V } var ic: IdentityConstructor; >ic : IdentityConstructor @@ -72,8 +72,8 @@ s = map("", new ic()); >s = map("", new ic()) : string >s : string >map("", new ic()) : string ->map : typeof map ->new ic() : typeof identity +>map : (array: T, func: (x: T) => U) => U +>new ic() : (y: V) => V >ic : IdentityConstructor // assignment @@ -84,37 +84,37 @@ s = map("", t = identity); >s = map("", t = identity) : string >s : string >map("", t = identity) : string ->map : typeof map ->t = identity : typeof identity +>map : (array: T, func: (x: T) => U) => U +>t = identity : (y: V) => V >t : any ->identity : typeof identity +>identity : (y: V) => V // type assertion s = map("", identity); >s = map("", identity) : string >s : string >map("", identity) : string ->map : typeof map ->identity : typeof identity ->identity : typeof identity ->identity : typeof identity +>map : (array: T, func: (x: T) => U) => U +>identity : (y: V) => V +>identity : (y: V) => V +>identity : (y: V) => V // parenthesized expression s = map("", (identity)); >s = map("", (identity)) : string >s : string >map("", (identity)) : string ->map : typeof map ->(identity) : typeof identity ->identity : typeof identity +>map : (array: T, func: (x: T) => U) => U +>(identity) : (y: V) => V +>identity : (y: V) => V // comma s = map("", ("", identity)); >s = map("", ("", identity)) : string >s : string >map("", ("", identity)) : string ->map : typeof map ->("", identity) : typeof identity ->"", identity : typeof identity ->identity : typeof identity +>map : (array: T, func: (x: T) => U) => U +>("", identity) : (y: V) => V +>"", identity : (y: V) => V +>identity : (y: V) => V diff --git a/tests/baselines/reference/inferentiallyTypingAnEmptyArray.types b/tests/baselines/reference/inferentiallyTypingAnEmptyArray.types index bd35eaac96e..c8f51c985e6 100644 --- a/tests/baselines/reference/inferentiallyTypingAnEmptyArray.types +++ b/tests/baselines/reference/inferentiallyTypingAnEmptyArray.types @@ -15,7 +15,7 @@ // Therefore, the following access to bar should not cause an error because we infer // the undefined[] type. declare function foo(arr: T[]): T; ->foo : typeof foo +>foo : (arr: T[]) => T >T : T >arr : T[] >T : T @@ -24,7 +24,7 @@ declare function foo(arr: T[]): T; foo([]).bar; >foo([]).bar : any >foo([]) : any ->foo : typeof foo +>foo : (arr: T[]) => T >[] : any[] >bar : any diff --git a/tests/baselines/reference/infiniteExpansionThroughTypeInference.types b/tests/baselines/reference/infiniteExpansionThroughTypeInference.types index 69c705ca5b0..df818833aa0 100644 --- a/tests/baselines/reference/infiniteExpansionThroughTypeInference.types +++ b/tests/baselines/reference/infiniteExpansionThroughTypeInference.types @@ -15,7 +15,7 @@ interface G { } function ff(g: G): void { ->ff : typeof ff +>ff : (g: G) => void >T : T >g : G >G : G @@ -23,7 +23,7 @@ function ff(g: G): void { ff(g) // when infering T here we need to make sure to not descend into the structure of G infinitely >ff(g) : void ->ff : typeof ff +>ff : (g: G) => void >g : G } diff --git a/tests/baselines/reference/infinitelyExpandingTypes5.types b/tests/baselines/reference/infinitelyExpandingTypes5.types index 7c1ba26a7cf..f145ff9539f 100644 --- a/tests/baselines/reference/infinitelyExpandingTypes5.types +++ b/tests/baselines/reference/infinitelyExpandingTypes5.types @@ -23,7 +23,7 @@ interface Enumerator { } function from(array: T[]): Query; ->from : typeof from +>from : { (array: T[]): Query; (enumerator: Enumerator): Query; } >T : T >array : T[] >T : T @@ -31,7 +31,7 @@ function from(array: T[]): Query; >T : T function from(enumerator: Enumerator): Query; ->from : typeof from +>from : { (array: T[]): Query; (enumerator: Enumerator): Query; } >T : T >enumerator : Enumerator >Enumerator : Enumerator @@ -40,7 +40,7 @@ function from(enumerator: Enumerator): Query; >T : T function from(arg: any): any { ->from : typeof from +>from : { (array: T[]): Query; (enumerator: Enumerator): Query; } >arg : any return undefined; diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.types b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.types index 9a86ce3e8cd..9190ef15779 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.types +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.types @@ -44,13 +44,13 @@ interface Options extends OptionsBase { function o(type: new () => Base) { ->o : typeof o +>o : (type: new () => Base) => void >type : new () => Base >Base : Base } o(A); >o(A) : void ->o : typeof o +>o : (type: new () => Base) => void >A : typeof A diff --git a/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.types b/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.types index 2dc52065feb..c24c0545c3e 100644 --- a/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.types +++ b/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.types @@ -4,20 +4,20 @@ interface IResultCallback extends Function { } >Function : Function function fn(cb: IResultCallback) { } ->fn : typeof fn +>fn : (cb: IResultCallback) => void >cb : IResultCallback >IResultCallback : IResultCallback fn((a, b) => true); >fn((a, b) => true) : void ->fn : typeof fn +>fn : (cb: IResultCallback) => void >(a, b) => true : (a: any, b: any) => boolean >a : any >b : any fn(function (a, b) { return true; }) >fn(function (a, b) { return true; }) : void ->fn : typeof fn +>fn : (cb: IResultCallback) => void >function (a, b) { return true; } : (a: any, b: any) => boolean >a : any >b : any diff --git a/tests/baselines/reference/innerAliases2.types b/tests/baselines/reference/innerAliases2.types index e7508d46ba9..ee8c18f93b4 100644 --- a/tests/baselines/reference/innerAliases2.types +++ b/tests/baselines/reference/innerAliases2.types @@ -24,7 +24,7 @@ module consumer { >UsefulClass : provider.UsefulClass function use():provider.UsefulClass { ->use : typeof use +>use : () => provider.UsefulClass >provider : unknown >UsefulClass : provider.UsefulClass diff --git a/tests/baselines/reference/innerFunc.types b/tests/baselines/reference/innerFunc.types index 7725f0c2928..8ca9e9d0a0b 100644 --- a/tests/baselines/reference/innerFunc.types +++ b/tests/baselines/reference/innerFunc.types @@ -1,6 +1,6 @@ === tests/cases/compiler/innerFunc.ts === function salt() { ->salt : typeof salt +>salt : () => number function pepper() { return 5;} >pepper : () => number @@ -14,7 +14,7 @@ module M { >M : typeof M export function tungsten() { ->tungsten : typeof tungsten +>tungsten : () => number function oxygen() { return 6; }; >oxygen : () => number diff --git a/tests/baselines/reference/innerOverloads.types b/tests/baselines/reference/innerOverloads.types index 5c5194e7de1..7168f6161f3 100644 --- a/tests/baselines/reference/innerOverloads.types +++ b/tests/baselines/reference/innerOverloads.types @@ -1,7 +1,7 @@ === tests/cases/compiler/innerOverloads.ts === function outer() { ->outer : typeof outer +>outer : () => any function inner(x:number); // should work >inner : { (x: number): any; (x: string): any; } @@ -24,6 +24,6 @@ function outer() { var x = outer(); // should work >x : any >outer() : any ->outer : typeof outer +>outer : () => any diff --git a/tests/baselines/reference/innerTypeArgumentInference.types b/tests/baselines/reference/innerTypeArgumentInference.types index d9f9c2c5dd8..759b78aa75f 100644 --- a/tests/baselines/reference/innerTypeArgumentInference.types +++ b/tests/baselines/reference/innerTypeArgumentInference.types @@ -5,7 +5,7 @@ interface Generator { (): T; } >T : T function Generate(func: Generator): U { ->Generate : typeof Generate +>Generate : (func: Generator) => U >U : U >func : Generator >Generator : Generator @@ -14,6 +14,6 @@ function Generate(func: Generator): U { return Generate(func); >Generate(func) : U ->Generate : typeof Generate +>Generate : (func: Generator) => U >func : Generator } diff --git a/tests/baselines/reference/innerTypeParameterShadowingOuterOne.types b/tests/baselines/reference/innerTypeParameterShadowingOuterOne.types index bdd687e727b..eb1ffb17217 100644 --- a/tests/baselines/reference/innerTypeParameterShadowingOuterOne.types +++ b/tests/baselines/reference/innerTypeParameterShadowingOuterOne.types @@ -3,7 +3,7 @@ // no errors expected function f() { ->f : typeof f +>f : () => void >T : T >Date : Date @@ -34,7 +34,7 @@ function f() { } function f2() { ->f2 : typeof f2 +>f2 : () => void >T : T >Date : Date >U : U diff --git a/tests/baselines/reference/instanceOfInExternalModules.types b/tests/baselines/reference/instanceOfInExternalModules.types index f0c85b2a4db..6e2eb8c77aa 100644 --- a/tests/baselines/reference/instanceOfInExternalModules.types +++ b/tests/baselines/reference/instanceOfInExternalModules.types @@ -4,7 +4,7 @@ import Bar = require("instanceOfInExternalModules_require"); >Bar : typeof Bar function IsFoo(value: any): boolean { ->IsFoo : typeof IsFoo +>IsFoo : (value: any) => boolean >value : any return value instanceof Bar.Foo; diff --git a/tests/baselines/reference/instanceofOperatorWithLHSIsTypeParameter.types b/tests/baselines/reference/instanceofOperatorWithLHSIsTypeParameter.types index ec6c9e3963f..d10c6c5cafa 100644 --- a/tests/baselines/reference/instanceofOperatorWithLHSIsTypeParameter.types +++ b/tests/baselines/reference/instanceofOperatorWithLHSIsTypeParameter.types @@ -1,6 +1,6 @@ === tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithLHSIsTypeParameter.ts === function foo(t: T) { ->foo : typeof foo +>foo : (t: T) => void >T : T >t : T >T : T diff --git a/tests/baselines/reference/interMixingModulesInterfaces0.types b/tests/baselines/reference/interMixingModulesInterfaces0.types index 8b6ace37a2b..977b02e15e8 100644 --- a/tests/baselines/reference/interMixingModulesInterfaces0.types +++ b/tests/baselines/reference/interMixingModulesInterfaces0.types @@ -6,7 +6,7 @@ module A { >B : typeof B export function createB(): B { ->createB : typeof createB +>createB : () => B >B : B return null; @@ -29,9 +29,9 @@ var x: A.B = A.B.createB(); >A : unknown >B : A.B >A.B.createB() : A.B ->A.B.createB : typeof A.B.createB +>A.B.createB : () => A.B >A.B : typeof A.B >A : typeof A >B : typeof A.B ->createB : typeof A.B.createB +>createB : () => A.B diff --git a/tests/baselines/reference/interMixingModulesInterfaces1.types b/tests/baselines/reference/interMixingModulesInterfaces1.types index 9df1c8fe069..c94cc80e5bf 100644 --- a/tests/baselines/reference/interMixingModulesInterfaces1.types +++ b/tests/baselines/reference/interMixingModulesInterfaces1.types @@ -16,7 +16,7 @@ module A { >B : typeof B export function createB(): B { ->createB : typeof createB +>createB : () => B >B : B return null; @@ -29,9 +29,9 @@ var x: A.B = A.B.createB(); >A : unknown >B : A.B >A.B.createB() : A.B ->A.B.createB : typeof A.B.createB +>A.B.createB : () => A.B >A.B : typeof A.B >A : typeof A >B : typeof A.B ->createB : typeof A.B.createB +>createB : () => A.B diff --git a/tests/baselines/reference/interMixingModulesInterfaces2.types b/tests/baselines/reference/interMixingModulesInterfaces2.types index 1d8af83003f..ff21c25358b 100644 --- a/tests/baselines/reference/interMixingModulesInterfaces2.types +++ b/tests/baselines/reference/interMixingModulesInterfaces2.types @@ -16,7 +16,7 @@ module A { >B : typeof B export function createB(): B { ->createB : typeof createB +>createB : () => B >B : B return null; diff --git a/tests/baselines/reference/interMixingModulesInterfaces3.types b/tests/baselines/reference/interMixingModulesInterfaces3.types index acb09eb1a7a..123d609c365 100644 --- a/tests/baselines/reference/interMixingModulesInterfaces3.types +++ b/tests/baselines/reference/interMixingModulesInterfaces3.types @@ -6,7 +6,7 @@ module A { >B : typeof B export function createB(): B { ->createB : typeof createB +>createB : () => B >B : B return null; diff --git a/tests/baselines/reference/interMixingModulesInterfaces4.types b/tests/baselines/reference/interMixingModulesInterfaces4.types index 9eb9905a1d2..e4e9bf385ac 100644 --- a/tests/baselines/reference/interMixingModulesInterfaces4.types +++ b/tests/baselines/reference/interMixingModulesInterfaces4.types @@ -6,7 +6,7 @@ module A { >B : typeof B export function createB(): number { ->createB : typeof createB +>createB : () => number return null; } @@ -26,9 +26,9 @@ module A { var x : number = A.B.createB(); >x : number >A.B.createB() : number ->A.B.createB : typeof A.B.createB +>A.B.createB : () => number >A.B : typeof A.B >A : typeof A >B : typeof A.B ->createB : typeof A.B.createB +>createB : () => number diff --git a/tests/baselines/reference/interMixingModulesInterfaces5.types b/tests/baselines/reference/interMixingModulesInterfaces5.types index c90a4236dbb..199b37b16eb 100644 --- a/tests/baselines/reference/interMixingModulesInterfaces5.types +++ b/tests/baselines/reference/interMixingModulesInterfaces5.types @@ -16,7 +16,7 @@ module A { >B : typeof B export function createB(): number { ->createB : typeof createB +>createB : () => number return null; } @@ -26,9 +26,9 @@ module A { var x: number = A.B.createB(); >x : number >A.B.createB() : number ->A.B.createB : typeof A.B.createB +>A.B.createB : () => number >A.B : typeof A.B >A : typeof A >B : typeof A.B ->createB : typeof A.B.createB +>createB : () => number diff --git a/tests/baselines/reference/interfaceWithPropertyOfEveryType.types b/tests/baselines/reference/interfaceWithPropertyOfEveryType.types index 94401aabc84..69ad29374a2 100644 --- a/tests/baselines/reference/interfaceWithPropertyOfEveryType.types +++ b/tests/baselines/reference/interfaceWithPropertyOfEveryType.types @@ -4,7 +4,7 @@ class C { foo: string; } >foo : string function f1() { } ->f1 : typeof f1 +>f1 : () => void module M { >M : typeof M @@ -61,8 +61,8 @@ interface Foo { >C : C l: typeof f1; ->l : typeof f1 ->f1 : typeof f1 +>l : () => void +>f1 : () => void m: typeof M; >m : typeof M @@ -79,7 +79,7 @@ interface Foo { var a: Foo = { >a : Foo >Foo : Foo ->{ a: 1, b: '', c: true, d: {}, e: null , f: [1], g: {}, h: (x: number) => 1, i: (x: T) => x, j: null, k: new C(), l: f1, m: M, n: {}, o: E.A} : { a: number; b: string; c: boolean; d: {}; e: null; f: number[]; g: {}; h: (x: number) => number; i: (x: T) => T; j: Foo; k: C; l: typeof f1; m: typeof M; n: {}; o: E; } +>{ a: 1, b: '', c: true, d: {}, e: null , f: [1], g: {}, h: (x: number) => 1, i: (x: T) => x, j: null, k: new C(), l: f1, m: M, n: {}, o: E.A} : { a: number; b: string; c: boolean; d: {}; e: null; f: number[]; g: {}; h: (x: number) => number; i: (x: T) => T; j: Foo; k: C; l: () => void; m: typeof M; n: {}; o: E; } a: 1, >a : number @@ -129,8 +129,8 @@ var a: Foo = { >C : typeof C l: f1, ->l : typeof f1 ->f1 : typeof f1 +>l : () => void +>f1 : () => void m: M, >m : typeof M diff --git a/tests/baselines/reference/internalAliasFunction.types b/tests/baselines/reference/internalAliasFunction.types index f0dc1619b24..ed297ce1b4e 100644 --- a/tests/baselines/reference/internalAliasFunction.types +++ b/tests/baselines/reference/internalAliasFunction.types @@ -3,7 +3,7 @@ module a { >a : typeof a export function foo(x: number) { ->foo : typeof foo +>foo : (x: number) => number >x : number return x; @@ -15,17 +15,17 @@ module c { >c : typeof c import b = a.foo; ->b : typeof b +>b : (x: number) => number >a : typeof a ->foo : typeof b +>foo : (x: number) => number export var bVal = b(10); >bVal : number >b(10) : number ->b : typeof b +>b : (x: number) => number export var bVal2 = b; ->bVal2 : typeof b ->b : typeof b +>bVal2 : (x: number) => number +>b : (x: number) => number } diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.types b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.types index dd9637c8fdf..b3140e7b09a 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.types +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.types @@ -3,7 +3,7 @@ export module a { >a : typeof a export function foo(x: number) { ->foo : typeof foo +>foo : (x: number) => number >x : number return x; @@ -15,17 +15,17 @@ export module c { >c : typeof c export import b = a.foo; ->b : typeof b +>b : (x: number) => number >a : typeof a ->foo : typeof b +>foo : (x: number) => number export var bVal = b(10); >bVal : number >b(10) : number ->b : typeof b +>b : (x: number) => number export var bVal2 = b; ->bVal2 : typeof b ->b : typeof b +>bVal2 : (x: number) => number +>b : (x: number) => number } diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.types b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.types index 179025bffb3..c78b5040495 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.types +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.types @@ -3,7 +3,7 @@ export module a { >a : typeof a export function foo(x: number) { ->foo : typeof foo +>foo : (x: number) => number >x : number return x; @@ -15,17 +15,17 @@ export module c { >c : typeof c import b = a.foo; ->b : typeof b +>b : (x: number) => number >a : typeof a ->foo : typeof b +>foo : (x: number) => number var bVal = b(10); >bVal : number >b(10) : number ->b : typeof b +>b : (x: number) => number export var bVal2 = b; ->bVal2 : typeof b ->b : typeof b +>bVal2 : (x: number) => number +>b : (x: number) => number } diff --git a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.types b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.types index 0db9210378d..365f0edeb27 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.types +++ b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.types @@ -3,7 +3,7 @@ export module a { >a : typeof a export function foo(x: number) { ->foo : typeof foo +>foo : (x: number) => number >x : number return x; @@ -12,16 +12,16 @@ export module a { } export import b = a.foo; ->b : typeof b +>b : (x: number) => number >a : typeof a ->foo : typeof b +>foo : (x: number) => number export var bVal = b(10); >bVal : number >b(10) : number ->b : typeof b +>b : (x: number) => number export var bVal2 = b; ->bVal2 : typeof b ->b : typeof b +>bVal2 : (x: number) => number +>b : (x: number) => number diff --git a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.types b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.types index 316ff673449..c2f06c66f76 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.types +++ b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.types @@ -3,7 +3,7 @@ export module a { >a : typeof a export function foo(x: number) { ->foo : typeof foo +>foo : (x: number) => number >x : number return x; @@ -12,16 +12,16 @@ export module a { } import b = a.foo; ->b : typeof b +>b : (x: number) => number >a : typeof a ->foo : typeof b +>foo : (x: number) => number export var bVal = b(10); >bVal : number >b(10) : number ->b : typeof b +>b : (x: number) => number export var bVal2 = b; ->bVal2 : typeof b ->b : typeof b +>bVal2 : (x: number) => number +>b : (x: number) => number diff --git a/tests/baselines/reference/invalidUndefinedValues.types b/tests/baselines/reference/invalidUndefinedValues.types index 3824498d216..9cc71b87c82 100644 --- a/tests/baselines/reference/invalidUndefinedValues.types +++ b/tests/baselines/reference/invalidUndefinedValues.types @@ -75,7 +75,7 @@ x = { f() { } } >f() { } : () => void function f(a: T) { ->f : typeof f +>f : (a: T) => void >T : T >a : T >T : T @@ -86,9 +86,9 @@ function f(a: T) { >a : T } x = f; ->x = f : typeof f +>x = f : (a: T) => void >x : any ->f : typeof f +>f : (a: T) => void enum E { A } >E : E diff --git a/tests/baselines/reference/lambdaASIEmit.types b/tests/baselines/reference/lambdaASIEmit.types index 07b4431e519..b72a805cd12 100644 --- a/tests/baselines/reference/lambdaASIEmit.types +++ b/tests/baselines/reference/lambdaASIEmit.types @@ -1,14 +1,14 @@ === tests/cases/compiler/lambdaASIEmit.ts === function Foo(x: any) ->Foo : typeof Foo +>Foo : (x: any) => void >x : any { } Foo(() => >Foo(() => // do something 127) : void ->Foo : typeof Foo +>Foo : (x: any) => void >() => // do something 127 : () => number // do something diff --git a/tests/baselines/reference/listFailure.types b/tests/baselines/reference/listFailure.types index cd235e53986..de3c33bbfad 100644 --- a/tests/baselines/reference/listFailure.types +++ b/tests/baselines/reference/listFailure.types @@ -10,7 +10,7 @@ module Editor { >List : List >Line : Line >ListMakeHead() : List ->ListMakeHead : typeof ListMakeHead +>ListMakeHead : () => List >Line : Line addLine(lineText: string): List { @@ -41,7 +41,7 @@ module Editor { } export function ListRemoveEntry(entry: List): List { ->ListRemoveEntry : typeof ListRemoveEntry +>ListRemoveEntry : (entry: List) => List >U : U >entry : List >List : List @@ -54,7 +54,7 @@ module Editor { } export function ListMakeHead(): List { ->ListMakeHead : typeof ListMakeHead +>ListMakeHead : () => List >U : U >List : List >U : U @@ -63,7 +63,7 @@ module Editor { } export function ListMakeEntry(data: U): List { ->ListMakeEntry : typeof ListMakeEntry +>ListMakeEntry : (data: U) => List >U : U >data : U >U : U @@ -95,7 +95,7 @@ module Editor { >this : List >next : List >ListMakeEntry(data) : List ->ListMakeEntry : typeof ListMakeEntry +>ListMakeEntry : (data: U) => List >data : T return this.next; @@ -115,7 +115,7 @@ module Editor { return (ListRemoveEntry(this.next)); >(ListRemoveEntry(this.next)) : List >ListRemoveEntry(this.next) : List ->ListRemoveEntry : typeof ListRemoveEntry +>ListRemoveEntry : (entry: List) => List >this.next : List >this : List >next : List diff --git a/tests/baselines/reference/localImportNameVsGlobalName.types b/tests/baselines/reference/localImportNameVsGlobalName.types index 6b920a25fe7..7cb45208e81 100644 --- a/tests/baselines/reference/localImportNameVsGlobalName.types +++ b/tests/baselines/reference/localImportNameVsGlobalName.types @@ -19,27 +19,27 @@ module App { >Key : Key export function foo(key: Key): void {} ->foo : typeof foo +>foo : (key: Key) => void >key : Key >Key : Key foo(Key.UP); >foo(Key.UP) : void ->foo : typeof foo +>foo : (key: Key) => void >Key.UP : Key >Key : typeof Key >UP : Key foo(Key.DOWN); >foo(Key.DOWN) : void ->foo : typeof foo +>foo : (key: Key) => void >Key.DOWN : Key >Key : typeof Key >DOWN : Key foo(Key.LEFT); >foo(Key.LEFT) : void ->foo : typeof foo +>foo : (key: Key) => void >Key.LEFT : Key >Key : typeof Key >LEFT : Key diff --git a/tests/baselines/reference/localVariablesReturnedFromCatchBlocks.types b/tests/baselines/reference/localVariablesReturnedFromCatchBlocks.types index b18925989c4..81ee0ddc74a 100644 --- a/tests/baselines/reference/localVariablesReturnedFromCatchBlocks.types +++ b/tests/baselines/reference/localVariablesReturnedFromCatchBlocks.types @@ -1,6 +1,6 @@ === tests/cases/compiler/localVariablesReturnedFromCatchBlocks.ts === function f() { ->f : typeof f +>f : () => any try { } catch (e) { diff --git a/tests/baselines/reference/logicalAndOperatorWithTypeParameters.types b/tests/baselines/reference/logicalAndOperatorWithTypeParameters.types index 711fca6c1e1..f77b231c6bc 100644 --- a/tests/baselines/reference/logicalAndOperatorWithTypeParameters.types +++ b/tests/baselines/reference/logicalAndOperatorWithTypeParameters.types @@ -3,7 +3,7 @@ // type as the second operand. function foo(t: T, u: U, v: V) { ->foo : typeof foo +>foo : (t: T, u: U, v: V) => void >T : T >U : U >V : V diff --git a/tests/baselines/reference/logicalNotOperatorWithBooleanType.types b/tests/baselines/reference/logicalNotOperatorWithBooleanType.types index 031c986a9b2..e232ae2af80 100644 --- a/tests/baselines/reference/logicalNotOperatorWithBooleanType.types +++ b/tests/baselines/reference/logicalNotOperatorWithBooleanType.types @@ -4,7 +4,7 @@ var BOOLEAN: boolean; >BOOLEAN : boolean function foo(): boolean { return true; } ->foo : typeof foo +>foo : () => boolean class A { >A : A @@ -64,7 +64,7 @@ var ResultIsBoolean6 = !foo(); >ResultIsBoolean6 : boolean >!foo() : boolean >foo() : boolean ->foo : typeof foo +>foo : () => boolean var ResultIsBoolean7 = !A.foo(); >ResultIsBoolean7 : boolean @@ -92,7 +92,7 @@ var ResultIsBoolean = !!BOOLEAN; !foo(); >!foo() : boolean >foo() : boolean ->foo : typeof foo +>foo : () => boolean !true, false; >!true, false : boolean diff --git a/tests/baselines/reference/logicalNotOperatorWithNumberType.types b/tests/baselines/reference/logicalNotOperatorWithNumberType.types index bfd710ef2ee..4bcc8a14041 100644 --- a/tests/baselines/reference/logicalNotOperatorWithNumberType.types +++ b/tests/baselines/reference/logicalNotOperatorWithNumberType.types @@ -8,7 +8,7 @@ var NUMBER1: number[] = [1, 2]; >[1, 2] : number[] function foo(): number { return 1; } ->foo : typeof foo +>foo : () => number class A { >A : A @@ -89,7 +89,7 @@ var ResultIsBoolean9 = !foo(); >ResultIsBoolean9 : boolean >!foo() : boolean >foo() : number ->foo : typeof foo +>foo : () => number var ResultIsBoolean10 = !A.foo(); >ResultIsBoolean10 : boolean @@ -139,7 +139,7 @@ var ResultIsBoolean13 = !!!(NUMBER + NUMBER); !foo(); >!foo() : boolean >foo() : number ->foo : typeof foo +>foo : () => number !objA.a; >!objA.a : boolean diff --git a/tests/baselines/reference/logicalNotOperatorWithStringType.types b/tests/baselines/reference/logicalNotOperatorWithStringType.types index 6c154a1d62f..2decb1ade18 100644 --- a/tests/baselines/reference/logicalNotOperatorWithStringType.types +++ b/tests/baselines/reference/logicalNotOperatorWithStringType.types @@ -8,7 +8,7 @@ var STRING1: string[] = ["", "abc"]; >["", "abc"] : string[] function foo(): string { return "abc"; } ->foo : typeof foo +>foo : () => string class A { >A : A @@ -89,7 +89,7 @@ var ResultIsBoolean9 = !foo(); >ResultIsBoolean9 : boolean >!foo() : boolean >foo() : string ->foo : typeof foo +>foo : () => string var ResultIsBoolean10 = !A.foo(); >ResultIsBoolean10 : boolean @@ -147,7 +147,7 @@ var ResultIsBoolean14 = !!!(STRING + STRING); !foo(); >!foo() : boolean >foo() : string ->foo : typeof foo +>foo : () => string !objA.a,M.n; >!objA.a,M.n : string diff --git a/tests/baselines/reference/logicalOrOperatorWithTypeParameters.types b/tests/baselines/reference/logicalOrOperatorWithTypeParameters.types index 374a7cdd5e9..ff0e0ce568a 100644 --- a/tests/baselines/reference/logicalOrOperatorWithTypeParameters.types +++ b/tests/baselines/reference/logicalOrOperatorWithTypeParameters.types @@ -1,6 +1,6 @@ === tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithTypeParameters.ts === function fn1(t: T, u: U) { ->fn1 : typeof fn1 +>fn1 : (t: T, u: U) => void >T : T >U : U >t : T @@ -35,7 +35,7 @@ function fn1(t: T, u: U) { } function fn2(t: T, u: U, v: V) { ->fn2 : typeof fn2 +>fn2 : (t: T, u: U, v: V) => void >T : T >U : U >V : V @@ -82,7 +82,7 @@ function fn2(t: T, u: U, v: V) { } function fn3(t: T, u: U) { ->fn3 : typeof fn3 +>fn3 : (t: T, u: U) => void >T : T >a : string >b : string diff --git a/tests/baselines/reference/mergedDeclarations1.types b/tests/baselines/reference/mergedDeclarations1.types index 7e8eac5b875..20249ab94e1 100644 --- a/tests/baselines/reference/mergedDeclarations1.types +++ b/tests/baselines/reference/mergedDeclarations1.types @@ -30,7 +30,7 @@ module point { >point : typeof point export function equals(p1: Point, p2: Point) { ->equals : typeof equals +>equals : (p1: Point, p2: Point) => boolean >p1 : Point >Point : Point >p2 : Point @@ -68,9 +68,9 @@ var p2 = point.origin; var b = point.equals(p1, p2); >b : boolean >point.equals(p1, p2) : boolean ->point.equals : typeof point.equals +>point.equals : (p1: Point, p2: Point) => boolean >point : typeof point ->equals : typeof point.equals +>equals : (p1: Point, p2: Point) => boolean >p1 : Point >p2 : Point diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen2.types b/tests/baselines/reference/mergedModuleDeclarationCodeGen2.types index c7fd6eb2196..790ec8d9377 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen2.types +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen2.types @@ -5,20 +5,20 @@ module my.data.foo { >foo : typeof foo export function buz() { } ->buz : typeof buz +>buz : () => void } module my.data { >my : typeof my >data : typeof my.data function data(my) { ->data : typeof data +>data : (my: any) => void >my : any foo.buz(); >foo.buz() : void ->foo.buz : typeof foo.buz +>foo.buz : () => void >foo : typeof foo ->buz : typeof foo.buz +>buz : () => void } } diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen3.types b/tests/baselines/reference/mergedModuleDeclarationCodeGen3.types index 2013d068571..45f652fe3c0 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen3.types +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen3.types @@ -4,7 +4,7 @@ module my.data { >data : typeof data export function buz() { } ->buz : typeof buz +>buz : () => void } module my.data.foo { >my : typeof my @@ -12,12 +12,12 @@ module my.data.foo { >foo : typeof foo function data(my, foo) { ->data : typeof data +>data : (my: any, foo: any) => void >my : any >foo : any buz(); >buz() : void ->buz : typeof buz +>buz : () => void } } diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen4.types b/tests/baselines/reference/mergedModuleDeclarationCodeGen4.types index aa0dfdb4762..0907a21a969 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen4.types +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen4.types @@ -13,7 +13,7 @@ module superContain { >data : typeof data export function foo() { } ->foo : typeof foo +>foo : () => void } } export module my.buz { @@ -24,7 +24,7 @@ module superContain { >data : typeof data export function bar(contain, my, buz, data) { ->bar : typeof bar +>bar : (contain: any, my: any, buz: any, data: any) => void >contain : any >my : any >buz : any @@ -32,7 +32,7 @@ module superContain { foo(); >foo() : void ->foo : typeof foo +>foo : () => void } } } diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.types b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.types index e5b6520721f..ab4203d7951 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.types +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.types @@ -5,10 +5,10 @@ module M.buz.plop { >plop : typeof buz.plop export function doom() { } ->doom : typeof doom +>doom : () => void export function M() { } ->M : typeof M +>M : () => void } module M.buz.plop { >M : typeof M @@ -16,10 +16,10 @@ module M.buz.plop { >plop : typeof M.buz.plop function gunk() { } ->gunk : typeof gunk +>gunk : () => void function buz() { } ->buz : typeof buz +>buz : () => void export class fudge { } >fudge : fudge @@ -29,20 +29,20 @@ module M.buz.plop { // Emit these references as follows var v1 = gunk; // gunk ->v1 : typeof gunk ->gunk : typeof gunk +>v1 : () => void +>gunk : () => void var v2 = buz; // buz ->v2 : typeof buz ->buz : typeof buz +>v2 : () => void +>buz : () => void export var v3 = doom; // _plop.doom ->v3 : typeof doom ->doom : typeof doom +>v3 : () => void +>doom : () => void export var v4 = M; // _plop.M ->v4 : typeof M ->M : typeof M +>v4 : () => void +>M : () => void export var v5 = fudge; // fudge >v5 : typeof fudge diff --git a/tests/baselines/reference/methodContainingLocalFunction.types b/tests/baselines/reference/methodContainingLocalFunction.types index fb52c3831ba..48c4be12631 100644 --- a/tests/baselines/reference/methodContainingLocalFunction.types +++ b/tests/baselines/reference/methodContainingLocalFunction.types @@ -92,7 +92,7 @@ module M { >M : typeof M export function exhibitBug() { ->exhibitBug : typeof exhibitBug +>exhibitBug : () => void function localFunction() { } >localFunction : () => void diff --git a/tests/baselines/reference/mixedExports.types b/tests/baselines/reference/mixedExports.types index 36bf875fd64..f7ff0a13c34 100644 --- a/tests/baselines/reference/mixedExports.types +++ b/tests/baselines/reference/mixedExports.types @@ -3,13 +3,13 @@ declare module M { >M : typeof M function foo(); ->foo : typeof foo +>foo : { (): any; (): any; (): any; } export function foo(); ->foo : typeof foo +>foo : { (): any; (): any; (): any; } function foo(); ->foo : typeof foo +>foo : { (): any; (): any; (): any; } } declare module M1 { diff --git a/tests/baselines/reference/modFunctionCrash.types b/tests/baselines/reference/modFunctionCrash.types index d210d3853c1..596dac999a1 100644 --- a/tests/baselines/reference/modFunctionCrash.types +++ b/tests/baselines/reference/modFunctionCrash.types @@ -3,16 +3,16 @@ declare module Q { >Q : typeof Q function f(fn:()=>void); // typechecking the function type shouldnot crash the compiler ->f : typeof f +>f : (fn: () => void) => any >fn : () => void } Q.f(function() {this;}); >Q.f(function() {this;}) : any ->Q.f : typeof Q.f +>Q.f : (fn: () => void) => any >Q : typeof Q ->f : typeof Q.f +>f : (fn: () => void) => any >function() {this;} : () => void >this : any diff --git a/tests/baselines/reference/moduleAliasAsFunctionArgument.types b/tests/baselines/reference/moduleAliasAsFunctionArgument.types index c70939eb9da..dc621aa5dbf 100644 --- a/tests/baselines/reference/moduleAliasAsFunctionArgument.types +++ b/tests/baselines/reference/moduleAliasAsFunctionArgument.types @@ -4,7 +4,7 @@ import a = require('moduleAliasAsFunctionArgument_0'); >a : typeof a function fn(arg: { x: number }) { ->fn : typeof fn +>fn : (arg: { x: number; }) => void >arg : { x: number; } >x : number } @@ -16,7 +16,7 @@ a.x; // OK fn(a); // Error: property 'x' is missing from 'a' >fn(a) : void ->fn : typeof fn +>fn : (arg: { x: number; }) => void >a : typeof a === tests/cases/compiler/moduleAliasAsFunctionArgument_0.ts === diff --git a/tests/baselines/reference/moduleCodeGenTest5.types b/tests/baselines/reference/moduleCodeGenTest5.types index 57f7b7e45e1..40161509aff 100644 --- a/tests/baselines/reference/moduleCodeGenTest5.types +++ b/tests/baselines/reference/moduleCodeGenTest5.types @@ -6,10 +6,10 @@ var y = 0; >y : number export function f1() {} ->f1 : typeof f1 +>f1 : () => void function f2() {} ->f2 : typeof f2 +>f2 : () => void export class C1 { >C1 : C1 diff --git a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.types b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.types index 5d2da7fc60d..d8f6083b2c9 100644 --- a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.types +++ b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.types @@ -34,9 +34,9 @@ module TypeScript { return Syntax.childIndex(); >Syntax.childIndex() : void ->Syntax.childIndex : typeof Syntax.childIndex +>Syntax.childIndex : () => void >Syntax : typeof Syntax ->childIndex : typeof Syntax.childIndex +>childIndex : () => void } } @@ -91,7 +91,7 @@ module TypeScript.Syntax { >Syntax : typeof Syntax export function childIndex() { } ->childIndex : typeof childIndex +>childIndex : () => void export class VariableWidthTokenWithTrailingTrivia implements ISyntaxToken { >VariableWidthTokenWithTrailingTrivia : VariableWidthTokenWithTrailingTrivia diff --git a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.types b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.types index 3a1c0b07d92..2a5d2c76e76 100644 --- a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.types +++ b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.types @@ -17,7 +17,7 @@ module TypeScript { >diagnosticWriter : any export function Alert(output: string) { ->Alert : typeof Alert +>Alert : (output: string) => void >output : string if (diagnosticWriter) { diff --git a/tests/baselines/reference/moduleScopingBug.types b/tests/baselines/reference/moduleScopingBug.types index 00cd06d076c..b92b8de0c81 100644 --- a/tests/baselines/reference/moduleScopingBug.types +++ b/tests/baselines/reference/moduleScopingBug.types @@ -8,7 +8,7 @@ module M >outer : number function f() { ->f : typeof f +>f : () => void var inner = outer; // Ok >inner : number diff --git a/tests/baselines/reference/moduleSymbolMerging.types b/tests/baselines/reference/moduleSymbolMerging.types index a4ddda20af7..c6b0f58ef46 100644 --- a/tests/baselines/reference/moduleSymbolMerging.types +++ b/tests/baselines/reference/moduleSymbolMerging.types @@ -7,7 +7,7 @@ module B { >B : typeof B export function f(): A.I { return null; } ->f : typeof f +>f : () => A.I >A : unknown >I : A.I } diff --git a/tests/baselines/reference/moduleUnassignedVariable.types b/tests/baselines/reference/moduleUnassignedVariable.types index c4eeecbf39f..7d1dd8600cf 100644 --- a/tests/baselines/reference/moduleUnassignedVariable.types +++ b/tests/baselines/reference/moduleUnassignedVariable.types @@ -6,14 +6,14 @@ module Bar { >a : number function fooA() { return a; } // Correct: return Bar.a ->fooA : typeof fooA +>fooA : () => number >a : number export var b; >b : any function fooB() { return b; } // Incorrect: return b ->fooB : typeof fooB +>fooB : () => any >b : any } diff --git a/tests/baselines/reference/moduleVisibilityTest1.types b/tests/baselines/reference/moduleVisibilityTest1.types index aa4e7c91d88..8c22f792049 100644 --- a/tests/baselines/reference/moduleVisibilityTest1.types +++ b/tests/baselines/reference/moduleVisibilityTest1.types @@ -5,14 +5,14 @@ module OuterMod { >OuterMod : typeof OuterMod export function someExportedOuterFunc() { return -1; } ->someExportedOuterFunc : typeof someExportedOuterFunc +>someExportedOuterFunc : () => number >-1 : number export module OuterInnerMod { >OuterInnerMod : typeof OuterInnerMod export function someExportedOuterInnerFunc() { return "foo"; } ->someExportedOuterInnerFunc : typeof someExportedOuterInnerFunc +>someExportedOuterInnerFunc : () => string } } @@ -28,7 +28,7 @@ module M { >InnerMod : typeof InnerMod export function someExportedInnerFunc() { return -2; } ->someExportedInnerFunc : typeof someExportedInnerFunc +>someExportedInnerFunc : () => number >-2 : number } @@ -76,23 +76,23 @@ module M { public someMethodThatCallsAnOuterMethod() {return OuterInnerAlias.someExportedOuterInnerFunc();} >someMethodThatCallsAnOuterMethod : () => string >OuterInnerAlias.someExportedOuterInnerFunc() : string ->OuterInnerAlias.someExportedOuterInnerFunc : typeof OuterInnerAlias.someExportedOuterInnerFunc +>OuterInnerAlias.someExportedOuterInnerFunc : () => string >OuterInnerAlias : typeof OuterInnerAlias ->someExportedOuterInnerFunc : typeof OuterInnerAlias.someExportedOuterInnerFunc +>someExportedOuterInnerFunc : () => string public someMethodThatCallsAnInnerMethod() {return InnerMod.someExportedInnerFunc();} >someMethodThatCallsAnInnerMethod : () => number >InnerMod.someExportedInnerFunc() : number ->InnerMod.someExportedInnerFunc : typeof InnerMod.someExportedInnerFunc +>InnerMod.someExportedInnerFunc : () => number >InnerMod : typeof InnerMod ->someExportedInnerFunc : typeof InnerMod.someExportedInnerFunc +>someExportedInnerFunc : () => number public someMethodThatCallsAnOuterInnerMethod() {return OuterMod.someExportedOuterFunc();} >someMethodThatCallsAnOuterInnerMethod : () => number >OuterMod.someExportedOuterFunc() : number ->OuterMod.someExportedOuterFunc : typeof OuterMod.someExportedOuterFunc +>OuterMod.someExportedOuterFunc : () => number >OuterMod : typeof OuterMod ->someExportedOuterFunc : typeof OuterMod.someExportedOuterFunc +>someExportedOuterFunc : () => number public someMethod() { return 0; } >someMethod : () => number @@ -113,7 +113,7 @@ module M { >someModuleVar : number function someModuleFunction() { return 5;} ->someModuleFunction : typeof someModuleFunction +>someModuleFunction : () => number } module M { diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.types b/tests/baselines/reference/moduleWithStatementsOfEveryKind.types index 2e1860fc2c9..263da21f524 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.types +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.types @@ -47,7 +47,7 @@ module A { >x : number function F(s: string): number { ->F : typeof F +>F : (s: string) => number >s : string return 2; @@ -121,7 +121,7 @@ module Y { >x : number export function F(s: string): number { ->F : typeof F +>F : (s: string) => number >s : string return 2; diff --git a/tests/baselines/reference/multiCallOverloads.types b/tests/baselines/reference/multiCallOverloads.types index effde837b3c..8c789510580 100644 --- a/tests/baselines/reference/multiCallOverloads.types +++ b/tests/baselines/reference/multiCallOverloads.types @@ -7,7 +7,7 @@ interface ICallback { } function load(f: ICallback) {} ->load : typeof load +>load : (f: ICallback) => void >f : ICallback >ICallback : ICallback @@ -25,22 +25,22 @@ var f2: ICallback = function(z?) {} load(f1) // ok >load(f1) : void ->load : typeof load +>load : (f: ICallback) => void >f1 : ICallback load(f2) // ok >load(f2) : void ->load : typeof load +>load : (f: ICallback) => void >f2 : ICallback load(function() {}) // this shouldn’t be an error >load(function() {}) : void ->load : typeof load +>load : (f: ICallback) => void >function() {} : () => void load(function(z?) {}) // this shouldn't be an error >load(function(z?) {}) : void ->load : typeof load +>load : (f: ICallback) => void >function(z?) {} : (z?: string) => void >z : string diff --git a/tests/baselines/reference/multiModuleClodule1.types b/tests/baselines/reference/multiModuleClodule1.types index 39ae7b45b60..f7379e33173 100644 --- a/tests/baselines/reference/multiModuleClodule1.types +++ b/tests/baselines/reference/multiModuleClodule1.types @@ -28,10 +28,10 @@ module C { >C : typeof C export function foo() { } ->foo : typeof foo +>foo : () => void function baz() { return ''; } ->baz : typeof baz +>baz : () => string } var c = new C(C.x); @@ -43,11 +43,11 @@ var c = new C(C.x); >x : number c.foo = C.foo; ->c.foo = C.foo : typeof C.foo +>c.foo = C.foo : () => void >c.foo : () => void >c : C >foo : () => void ->C.foo : typeof C.foo +>C.foo : () => void >C : typeof C ->foo : typeof C.foo +>foo : () => void diff --git a/tests/baselines/reference/multiModuleFundule1.types b/tests/baselines/reference/multiModuleFundule1.types index 53b3c6342ae..c78a195f4b1 100644 --- a/tests/baselines/reference/multiModuleFundule1.types +++ b/tests/baselines/reference/multiModuleFundule1.types @@ -13,7 +13,7 @@ module C { >C : typeof C export function foo() { } ->foo : typeof foo +>foo : () => void } var r = C(2); @@ -29,7 +29,7 @@ var r2 = new C(2); // using void returning function as constructor var r3 = C.foo(); >r3 : void >C.foo() : void ->C.foo : typeof C.foo +>C.foo : () => void >C : typeof C ->foo : typeof C.foo +>foo : () => void diff --git a/tests/baselines/reference/mutrec.types b/tests/baselines/reference/mutrec.types index 602c6209be7..6c147174484 100644 --- a/tests/baselines/reference/mutrec.types +++ b/tests/baselines/reference/mutrec.types @@ -16,7 +16,7 @@ interface B { } function f(p: A) { return p }; ->f : typeof f +>f : (p: A) => A >p : A >A : A >p : A @@ -27,7 +27,7 @@ var b:B; f(b); >f(b) : A ->f : typeof f +>f : (p: A) => A >b : B interface I1 { @@ -55,7 +55,7 @@ interface I3 { } function g(p: I1) { return p }; ->g : typeof g +>g : (p: I1) => I1 >p : I1 >I1 : I1 >p : I1 @@ -66,7 +66,7 @@ var i2:I2; g(i2); >g(i2) : I1 ->g : typeof g +>g : (p: I1) => I1 >i2 : I2 var i3:I3; @@ -75,7 +75,7 @@ var i3:I3; g(i3); >g(i3) : I1 ->g : typeof g +>g : (p: I1) => I1 >i3 : I3 interface I4 { @@ -100,7 +100,7 @@ var i4:I4; g(i4); >g(i4) : I1 ->g : typeof g +>g : (p: I1) => I1 >i4 : I4 diff --git a/tests/baselines/reference/nameWithRelativePaths.types b/tests/baselines/reference/nameWithRelativePaths.types index 5f28e9a6169..2dc303b2583 100644 --- a/tests/baselines/reference/nameWithRelativePaths.types +++ b/tests/baselines/reference/nameWithRelativePaths.types @@ -22,9 +22,9 @@ if(foo2.M2.x){ >foo0 : typeof foo0 >foo : number >foo1.f() : number ->foo1.f : typeof foo1.f +>foo1.f : () => number >foo1 : typeof foo1 ->f : typeof foo1.f +>f : () => number } === tests/cases/conformance/externalModules/foo_0.ts === @@ -33,7 +33,7 @@ export var foo = 42; === tests/cases/conformance/externalModules/test/test/foo_1.ts === export function f(){ ->f : typeof f +>f : () => number return 42; } diff --git a/tests/baselines/reference/negateOperatorWithAnyOtherType.types b/tests/baselines/reference/negateOperatorWithAnyOtherType.types index 87e7ece0051..8785ab073b2 100644 --- a/tests/baselines/reference/negateOperatorWithAnyOtherType.types +++ b/tests/baselines/reference/negateOperatorWithAnyOtherType.types @@ -22,7 +22,7 @@ var obj1 = { x: "", y: () => { }}; >() => { } : () => void function foo(): any { ->foo : typeof foo +>foo : () => any var a; >a : any @@ -137,7 +137,7 @@ var ResultIsNumber13 = -foo(); >ResultIsNumber13 : number >-foo() : number >foo() : any ->foo : typeof foo +>foo : () => any var ResultIsNumber14 = -A.foo(); >ResultIsNumber14 : number diff --git a/tests/baselines/reference/negateOperatorWithBooleanType.types b/tests/baselines/reference/negateOperatorWithBooleanType.types index 68fc41a5f9e..49467d87845 100644 --- a/tests/baselines/reference/negateOperatorWithBooleanType.types +++ b/tests/baselines/reference/negateOperatorWithBooleanType.types @@ -4,7 +4,7 @@ var BOOLEAN: boolean; >BOOLEAN : boolean function foo(): boolean { return true; } ->foo : typeof foo +>foo : () => boolean class A { >A : A @@ -64,7 +64,7 @@ var ResultIsNumber6 = -foo(); >ResultIsNumber6 : number >-foo() : number >foo() : boolean ->foo : typeof foo +>foo : () => boolean var ResultIsNumber7 = -A.foo(); >ResultIsNumber7 : number @@ -85,7 +85,7 @@ var ResultIsNumber7 = -A.foo(); -foo(); >-foo() : number >foo() : boolean ->foo : typeof foo +>foo : () => boolean -true, false; >-true, false : boolean diff --git a/tests/baselines/reference/negateOperatorWithNumberType.types b/tests/baselines/reference/negateOperatorWithNumberType.types index fbb2c365526..f6cee89f6df 100644 --- a/tests/baselines/reference/negateOperatorWithNumberType.types +++ b/tests/baselines/reference/negateOperatorWithNumberType.types @@ -8,7 +8,7 @@ var NUMBER1: number[] = [1, 2]; >[1, 2] : number[] function foo(): number { return 1; } ->foo : typeof foo +>foo : () => number class A { >A : A @@ -89,7 +89,7 @@ var ResultIsNumber9 = -foo(); >ResultIsNumber9 : number >-foo() : number >foo() : number ->foo : typeof foo +>foo : () => number var ResultIsNumber10 = -A.foo(); >ResultIsNumber10 : number @@ -122,7 +122,7 @@ var ResultIsNumber11 = -(NUMBER - NUMBER); -foo(); >-foo() : number >foo() : number ->foo : typeof foo +>foo : () => number -objA.a; >-objA.a : number diff --git a/tests/baselines/reference/negateOperatorWithStringType.types b/tests/baselines/reference/negateOperatorWithStringType.types index e7d1b793f9c..43a9f05cc5b 100644 --- a/tests/baselines/reference/negateOperatorWithStringType.types +++ b/tests/baselines/reference/negateOperatorWithStringType.types @@ -8,7 +8,7 @@ var STRING1: string[] = ["", "abc"]; >["", "abc"] : string[] function foo(): string { return "abc"; } ->foo : typeof foo +>foo : () => string class A { >A : A @@ -89,7 +89,7 @@ var ResultIsNumber9 = -foo(); >ResultIsNumber9 : number >-foo() : number >foo() : string ->foo : typeof foo +>foo : () => string var ResultIsNumber10 = -A.foo(); >ResultIsNumber10 : number @@ -130,7 +130,7 @@ var ResultIsNumber12 = -STRING.charAt(0); -foo(); >-foo() : number >foo() : string ->foo : typeof foo +>foo : () => string -objA.a,M.n; >-objA.a,M.n : string diff --git a/tests/baselines/reference/nestedIndexer.types b/tests/baselines/reference/nestedIndexer.types index 5511f322fd7..612f6a260b7 100644 --- a/tests/baselines/reference/nestedIndexer.types +++ b/tests/baselines/reference/nestedIndexer.types @@ -1,6 +1,6 @@ === tests/cases/compiler/nestedIndexer.ts === function then(x) { ->then : typeof then +>then : (x: any) => void >x : any var match: { [index: number]: string; } diff --git a/tests/baselines/reference/nestedRecursiveLambda.types b/tests/baselines/reference/nestedRecursiveLambda.types index 160204cb772..358ebda8abf 100644 --- a/tests/baselines/reference/nestedRecursiveLambda.types +++ b/tests/baselines/reference/nestedRecursiveLambda.types @@ -1,6 +1,6 @@ === tests/cases/compiler/nestedRecursiveLambda.ts === function f(a:any) { ->f : typeof f +>f : (a: any) => void >a : any void (r =>(r => r)); @@ -15,7 +15,7 @@ void (r =>(r => r)); } f((r =>(r => r))); >f((r =>(r => r))) : void ->f : typeof f +>f : (a: any) => void >(r =>(r => r)) : (r: any) => (r: any) => any >r =>(r => r) : (r: any) => (r: any) => any >r : any diff --git a/tests/baselines/reference/newOperatorConformance.types b/tests/baselines/reference/newOperatorConformance.types index 266aa89086e..37205bd6177 100644 --- a/tests/baselines/reference/newOperatorConformance.types +++ b/tests/baselines/reference/newOperatorConformance.types @@ -84,7 +84,7 @@ var d = new anyCtor1(undefined); // Construct expression of type where apparent type has a construct signature with 0 arguments function newFn1(s: T) { ->newFn1 : typeof newFn1 +>newFn1 : number>(s: T) => void >T : T >s : T >T : T @@ -100,7 +100,7 @@ function newFn1(s: T) { // Construct expression of type where apparent type has a construct signature with 1 arguments function newFn2(s: T) { ->newFn2 : typeof newFn2 +>newFn2 : string>(s: T) => void >T : T >s : number >s : T @@ -117,12 +117,12 @@ function newFn2(s: T) { // Construct expression of void returning function function fnVoid(): void { } ->fnVoid : typeof fnVoid +>fnVoid : () => void var t = new fnVoid(); >t : any >new fnVoid() : any ->fnVoid : typeof fnVoid +>fnVoid : () => void var t: any; >t : any diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.types b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.types index daeee8e1864..56f5701e912 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.types +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.types @@ -7,7 +7,7 @@ var console: { >val : any } function x() { ->x : typeof x +>x : () => void var _this = 5; >_this : number diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.types b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.types index c67508c16d7..6cf4428bcc5 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.types +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.types @@ -1,6 +1,6 @@ === tests/cases/compiler/noCollisionThisExpressionAndLocalVarInLambda.ts === declare function alert(message?: any): void; ->alert : typeof alert +>alert : (message?: any) => void >message : any var x = { @@ -24,7 +24,7 @@ var x = { } alert(x.doStuff(x => alert(x))); >alert(x.doStuff(x => alert(x))) : void ->alert : typeof alert +>alert : (message?: any) => void >x.doStuff(x => alert(x)) : () => any >x.doStuff : (callback: any) => () => any >x : { doStuff: (callback: any) => () => any; } @@ -32,6 +32,6 @@ alert(x.doStuff(x => alert(x))); >x => alert(x) : (x: any) => void >x : any >alert(x) : void ->alert : typeof alert +>alert : (message?: any) => void >x : any diff --git a/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.types b/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.types index 1413afd3938..35a62c6f671 100644 --- a/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.types +++ b/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.types @@ -10,7 +10,7 @@ var _this = 5; >_this : number function x() { ->x : typeof x +>x : () => void x => { console.log(this); }; >x => { console.log(this); } : (x: any) => void diff --git a/tests/baselines/reference/noSelfOnVars.types b/tests/baselines/reference/noSelfOnVars.types index 3f7f637a468..8a059d8bc60 100644 --- a/tests/baselines/reference/noSelfOnVars.types +++ b/tests/baselines/reference/noSelfOnVars.types @@ -1,6 +1,6 @@ === tests/cases/compiler/noSelfOnVars.ts === function foo() { ->foo : typeof foo +>foo : () => void function bar() { } >bar : () => void diff --git a/tests/baselines/reference/nonInstantiatedModule.types b/tests/baselines/reference/nonInstantiatedModule.types index 2a1e11ffcb6..1093fbd0653 100644 --- a/tests/baselines/reference/nonInstantiatedModule.types +++ b/tests/baselines/reference/nonInstantiatedModule.types @@ -45,7 +45,7 @@ module M2 { >Point : typeof Point export function Origin(): Point { ->Origin : typeof Origin +>Origin : () => Point >Point : Point return { x: 0, y: 0 }; diff --git a/tests/baselines/reference/null.types b/tests/baselines/reference/null.types index 6e937ce732e..0614b5efec4 100644 --- a/tests/baselines/reference/null.types +++ b/tests/baselines/reference/null.types @@ -15,7 +15,7 @@ class C { >C : C } function f() { ->f : typeof f +>f : () => C return null; return new C(); @@ -23,7 +23,7 @@ function f() { >C : typeof C } function g() { ->g : typeof g +>g : () => number return null; return 3; diff --git a/tests/baselines/reference/nullAssignableToEveryType.types b/tests/baselines/reference/nullAssignableToEveryType.types index 3fe16f828a4..aaf3b3bd8c5 100644 --- a/tests/baselines/reference/nullAssignableToEveryType.types +++ b/tests/baselines/reference/nullAssignableToEveryType.types @@ -99,7 +99,7 @@ var q: String = null; >String : String function foo(x: T, y: U, z: V) { ->foo : typeof foo +>foo : (x: T, y: U, z: V) => void >T : T >U : U >V : V diff --git a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.types b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.types index e954f677bb7..aa81f87bed6 100644 --- a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.types +++ b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.types @@ -239,7 +239,7 @@ var r16 = true ? null : ac; >ac : typeof c function f17(x: T) { ->f17 : typeof f17 +>f17 : (x: T) => void >T : T >x : T >T : T @@ -256,7 +256,7 @@ function f17(x: T) { } function f18(x: U) { ->f18 : typeof f18 +>f18 : (x: U) => void >T : T >U : U >x : U diff --git a/tests/baselines/reference/objectLitGetterSetter.types b/tests/baselines/reference/objectLitGetterSetter.types index 9ac8643baab..2215f60d889 100644 --- a/tests/baselines/reference/objectLitGetterSetter.types +++ b/tests/baselines/reference/objectLitGetterSetter.types @@ -20,7 +20,7 @@ eval("public = 1;"); >eval("public = 1;") : any ->eval : typeof eval +>eval : (x: string) => any return 11; }, diff --git a/tests/baselines/reference/objectLiteralArraySpecialization.types b/tests/baselines/reference/objectLiteralArraySpecialization.types index b7be0f6c1a0..d077354728b 100644 --- a/tests/baselines/reference/objectLiteralArraySpecialization.types +++ b/tests/baselines/reference/objectLiteralArraySpecialization.types @@ -1,6 +1,6 @@ === tests/cases/compiler/objectLiteralArraySpecialization.ts === declare function create(initialValues?: T[]): MyArrayWrapper; ->create : typeof create +>create : (initialValues?: T[]) => MyArrayWrapper >T : T >initialValues : T[] >T : T @@ -27,7 +27,7 @@ interface MyArrayWrapper { var thing = create([ { name: "bob", id: 24 }, { name: "doug", id: 32 } ]); // should not error >thing : MyArrayWrapper<{ name: string; id: number; }> >create([ { name: "bob", id: 24 }, { name: "doug", id: 32 } ]) : MyArrayWrapper<{ name: string; id: number; }> ->create : typeof create +>create : (initialValues?: T[]) => MyArrayWrapper >[ { name: "bob", id: 24 }, { name: "doug", id: 32 } ] : { name: string; id: number; }[] >{ name: "bob", id: 24 } : { name: string; id: number; } >name : string diff --git a/tests/baselines/reference/objectTypesIdentity.types b/tests/baselines/reference/objectTypesIdentity.types index 7a7db0b15d7..c148c4223ed 100644 --- a/tests/baselines/reference/objectTypesIdentity.types +++ b/tests/baselines/reference/objectTypesIdentity.types @@ -41,240 +41,240 @@ var b = { foo: '' }; >foo : string function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // error ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // error ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // error ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo: string; }): any; } >x : A >A : A function foo7(x: typeof a); // error ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo: string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo: string; }): any; } >x : B >B : B function foo10(x: typeof a); // error ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo: string; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: string; }): any; } >x : B >B : B function foo11(x: typeof b); // error ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: string; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo: string; }): any; } >x : I >I : I function foo13(x: typeof a); // error ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo: string; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: string; }): any; } >x : I >I : I function foo14(x: typeof b); // error ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: string; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentity2.types b/tests/baselines/reference/objectTypesIdentity2.types index 891a0e25c04..1969d55bd11 100644 --- a/tests/baselines/reference/objectTypesIdentity2.types +++ b/tests/baselines/reference/objectTypesIdentity2.types @@ -50,156 +50,156 @@ var b = { foo: E.A }; >A : E function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo: RegExp; }): any; } >x : A >A : A function foo7(x: typeof a); // ok ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo: RegExp; }): any; } >x : { foo: RegExp; } >a : { foo: RegExp; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo: RegExp; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // ok ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo: RegExp; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo: RegExp; }): any; } >x : { foo: RegExp; } >a : { foo: RegExp; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo: RegExp; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: E; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: E; }): any; } >x : { foo: E; } >b : { foo: E; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: E; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo: RegExp; }): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo: RegExp; }): any; } >x : { foo: RegExp; } >a : { foo: RegExp; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo: RegExp; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: E; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: E; }): any; } >x : { foo: E; } >b : { foo: E; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: E; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures.types b/tests/baselines/reference/objectTypesIdentityWithCallSignatures.types index d484446b91e..f73785fab0d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures.types +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures.types @@ -60,268 +60,268 @@ var b = { foo(x: string) { return ''; } }; >x : string function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: string): string; }): any; (x: { foo(x: string): string; }): any; } >x : { foo(x: string): string; } >a : { foo(x: string): string; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: string): string; }): any; (x: { foo(x: string): string; }): any; } >x : { foo(x: string): string; } >a : { foo(x: string): string; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: string): string; }): any; (x: { foo(x: string): string; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: string) => string; }): any; (x: { foo: (x: string) => string; }): any; } >x : { foo: (x: string) => string; } >b : { foo: (x: string) => string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: string) => string; }): any; (x: { foo: (x: string) => string; }): any; } >x : { foo: (x: string) => string; } >b : { foo: (x: string) => string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: string) => string; }): any; (x: { foo: (x: string) => string; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // error ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // error ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // error ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: string): string; }): any; } >x : A >A : A function foo7(x: typeof a); // error ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: string): string; }): any; } >x : { foo(x: string): string; } >a : { foo(x: string): string; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: string): string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: string): string; }): any; } >x : B >B : B function foo10(x: typeof a); // error ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: string): string; }): any; } >x : { foo(x: string): string; } >a : { foo(x: string): string; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: string): string; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: string) => string; }): any; } >x : B >B : B function foo11(x: typeof b); // error ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: string) => string; }): any; } >x : { foo: (x: string) => string; } >b : { foo: (x: string) => string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: string) => string; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // error ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: string): string; }): any; } >x : I >I : I function foo13(x: typeof a); // error ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: string): string; }): any; } >x : { foo(x: string): string; } >a : { foo(x: string): string; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: string): string; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: string) => string; }): any; } >x : I >I : I function foo14(x: typeof b); // error ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: string) => string; }): any; } >x : { foo: (x: string) => string; } >b : { foo: (x: string) => string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: string) => string; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.types b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.types index f45434ed589..16b658d0e43 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.types +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.types @@ -62,268 +62,268 @@ var b = { foo(x: RegExp) { return ''; } }; >RegExp : RegExp function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: Date): string; }): any; (x: { foo(x: Date): string; }): any; } >x : { foo(x: Date): string; } >a : { foo(x: Date): string; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: Date): string; }): any; (x: { foo(x: Date): string; }): any; } >x : { foo(x: Date): string; } >a : { foo(x: Date): string; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: Date): string; }): any; (x: { foo(x: Date): string; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: RegExp) => string; }): any; (x: { foo: (x: RegExp) => string; }): any; } >x : { foo: (x: RegExp) => string; } >b : { foo: (x: RegExp) => string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: RegExp) => string; }): any; (x: { foo: (x: RegExp) => string; }): any; } >x : { foo: (x: RegExp) => string; } >b : { foo: (x: RegExp) => string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: RegExp) => string; }): any; (x: { foo: (x: RegExp) => string; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // error ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: Date): string; }): any; } >x : A >A : A function foo7(x: typeof a); // ok ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: Date): string; }): any; } >x : { foo(x: Date): string; } >a : { foo(x: Date): string; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: Date): string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // ok ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: Date): string; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: Date): string; }): any; } >x : { foo(x: Date): string; } >a : { foo(x: Date): string; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: Date): string; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: RegExp) => string; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: RegExp) => string; }): any; } >x : { foo: (x: RegExp) => string; } >b : { foo: (x: RegExp) => string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: RegExp) => string; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // error ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: Date): string; }): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: Date): string; }): any; } >x : { foo(x: Date): string; } >a : { foo(x: Date): string; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: Date): string; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: RegExp) => string; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: RegExp) => string; }): any; } >x : { foo: (x: RegExp) => string; } >b : { foo: (x: RegExp) => string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: RegExp) => string; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.types b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.types index c0b3bbfcd45..0ebbc639e5f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.types +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.types @@ -64,268 +64,268 @@ var b = { foo(x: string) { return ''; } }; >x : string function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: string, y: string): string; }): any; (x: { foo(x: string, y: string): string; }): any; } >x : { foo(x: string, y: string): string; } >a : { foo(x: string, y: string): string; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: string, y: string): string; }): any; (x: { foo(x: string, y: string): string; }): any; } >x : { foo(x: string, y: string): string; } >a : { foo(x: string, y: string): string; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: string, y: string): string; }): any; (x: { foo(x: string, y: string): string; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: string) => string; }): any; (x: { foo: (x: string) => string; }): any; } >x : { foo: (x: string) => string; } >b : { foo: (x: string) => string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: string) => string; }): any; (x: { foo: (x: string) => string; }): any; } >x : { foo: (x: string) => string; } >b : { foo: (x: string) => string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: string) => string; }): any; (x: { foo: (x: string) => string; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // error ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: string, y: string): string; }): any; } >x : A >A : A function foo7(x: typeof a); // ok ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: string, y: string): string; }): any; } >x : { foo(x: string, y: string): string; } >a : { foo(x: string, y: string): string; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: string, y: string): string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // ok ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: string, y: string): string; }): any; } >x : B >B : B function foo10(x: typeof a); // error ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: string, y: string): string; }): any; } >x : { foo(x: string, y: string): string; } >a : { foo(x: string, y: string): string; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: string, y: string): string; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: string) => string; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: string) => string; }): any; } >x : { foo: (x: string) => string; } >b : { foo: (x: string) => string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: string) => string; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: string, y: string): string; }): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: string, y: string): string; }): any; } >x : { foo(x: string, y: string): string; } >a : { foo(x: string, y: string): string; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: string, y: string): string; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: string) => string; }): any; } >x : I >I : I function foo14(x: typeof b); // error ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: string) => string; }): any; } >x : { foo: (x: string) => string; } >b : { foo: (x: string) => string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: string) => string; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.types b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.types index becd0d14850..b72d0a799e4 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.types +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.types @@ -24,114 +24,114 @@ var a: { (x: string, y: string): string } >y : string function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: (x: string, y: string) => string): any; (x: (x: string, y: string) => string): any; } >x : (x: string, y: string) => string >a : (x: string, y: string) => string function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: (x: string, y: string) => string): any; (x: (x: string, y: string) => string): any; } >x : (x: string, y: string) => string >a : (x: string, y: string) => string function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: (x: string, y: string) => string): any; (x: (x: string, y: string) => string): any; } >x : any function foo4(x: I2); ->foo4 : typeof foo4 +>foo4 : { (x: I2): any; (x: I2): any; } >x : I2 >I2 : I2 function foo4(x: I2); // error ->foo4 : typeof foo4 +>foo4 : { (x: I2): any; (x: I2): any; } >x : I2 >I2 : I2 function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: I2): any; (x: I2): any; } >x : any function foo5(x: I2); ->foo5 : typeof foo5 +>foo5 : { (x: I2): any; (x: I2): any; } >x : I2 >I2 : I2 function foo5(x: I2); // ok ->foo5 : typeof foo5 +>foo5 : { (x: I2): any; (x: I2): any; } >x : I2 >I2 : I2 function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: I2): any; (x: I2): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: (x: string, y: string) => string): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: (x: string, y: string) => string): any; } >x : (x: string, y: string) => string >a : (x: string, y: string) => string function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: (x: string, y: string) => string): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: I2): any; } >x : I >I : I function foo14(x: I2); // error ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: I2): any; } >x : I2 >I2 : I2 function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: I2): any; } >x : any function foo14b(x: typeof a); ->foo14b : typeof foo14b +>foo14b : { (x: (x: string, y: string) => string): any; (x: I2): any; } >x : (x: string, y: string) => string >a : (x: string, y: string) => string function foo14b(x: I2); // ok ->foo14b : typeof foo14b +>foo14b : { (x: (x: string, y: string) => string): any; (x: I2): any; } >x : I2 >I2 : I2 function foo14b(x: any) { } ->foo14b : typeof foo14b +>foo14b : { (x: (x: string, y: string) => string): any; (x: I2): any; } >x : any function foo15(x: I); ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: I2): any; } >x : I >I : I function foo15(x: I2); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: I2): any; } >x : I2 >I2 : I2 function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: I2): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.types b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.types index e24ea1c88ac..4d8b8ccb42a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.types +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.types @@ -112,268 +112,268 @@ var b = { }; function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: number): number; foo(x: string): string; }): any; (x: { foo(x: number): number; foo(x: string): string; }): any; } >x : { foo(x: number): number; foo(x: string): string; } >a : { foo(x: number): number; foo(x: string): string; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: number): number; foo(x: string): string; }): any; (x: { foo(x: number): number; foo(x: string): string; }): any; } >x : { foo(x: number): number; foo(x: string): string; } >a : { foo(x: number): number; foo(x: string): string; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: number): number; foo(x: string): string; }): any; (x: { foo(x: number): number; foo(x: string): string; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: any) => any; }): any; (x: { foo: (x: any) => any; }): any; } >x : { foo: (x: any) => any; } >b : { foo: (x: any) => any; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: any) => any; }): any; (x: { foo: (x: any) => any; }): any; } >x : { foo: (x: any) => any; } >b : { foo: (x: any) => any; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: any) => any; }): any; (x: { foo: (x: any) => any; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // error ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // BUG 831930 ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: number): number; foo(x: string): string; }): any; } >x : A >A : A function foo7(x: typeof a); // BUG 831930 ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: number): number; foo(x: string): string; }): any; } >x : { foo(x: number): number; foo(x: string): string; } >a : { foo(x: number): number; foo(x: string): string; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: number): number; foo(x: string): string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // BUG 831930 ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // ok ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: number): number; foo(x: string): string; }): any; } >x : B >B : B function foo10(x: typeof a); // BUG 831930 ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: number): number; foo(x: string): string; }): any; } >x : { foo(x: number): number; foo(x: string): string; } >a : { foo(x: number): number; foo(x: string): string; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: number): number; foo(x: string): string; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: any) => any; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: any) => any; }): any; } >x : { foo: (x: any) => any; } >b : { foo: (x: any) => any; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: any) => any; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: number): number; foo(x: string): string; }): any; } >x : I >I : I function foo13(x: typeof a); // error ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: number): number; foo(x: string): string; }): any; } >x : { foo(x: number): number; foo(x: string): string; } >a : { foo(x: number): number; foo(x: string): string; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: number): number; foo(x: string): string; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: any) => any; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: any) => any; }): any; } >x : { foo: (x: any) => any; } >b : { foo: (x: any) => any; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: any) => any; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.types b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.types index f78a89f9097..a29f213bdde 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.types +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.types @@ -46,226 +46,226 @@ var a: { new(x: string) } >x : string function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: new (x: string) => any): any; (x: new (x: string) => any): any; } >x : new (x: string) => any >a : new (x: string) => any function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: new (x: string) => any): any; (x: new (x: string) => any): any; } >x : new (x: string) => any >a : new (x: string) => any function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: new (x: string) => any): any; (x: new (x: string) => any): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // error ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // error ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: new (x: string) => any): any; } >x : A >A : A function foo7(x: typeof a); // ok ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: new (x: string) => any): any; } >x : new (x: string) => any >a : new (x: string) => any function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: new (x: string) => any): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: string) => any): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: string) => any): any; } >x : new (x: string) => any >a : new (x: string) => any function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: string) => any): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: string) => any): any; } >x : I >I : I function foo13(x: typeof a); // error ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: string) => any): any; } >x : new (x: string) => any >a : new (x: string) => any function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: string) => any): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types index 2245a3c8cef..c530f1ced9b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types @@ -48,198 +48,198 @@ var b = { new(x: RegExp) { return ''; } }; // not a construct signature, functio >RegExp : RegExp function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: new (x: Date) => string): any; (x: new (x: Date) => string): any; } >x : new (x: Date) => string >a : new (x: Date) => string function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: new (x: Date) => string): any; (x: new (x: Date) => string): any; } >x : new (x: Date) => string >a : new (x: Date) => string function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: new (x: Date) => string): any; (x: new (x: Date) => string): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: RegExp) => string; }): any; (x: { new: (x: RegExp) => string; }): any; } >x : { new: (x: RegExp) => string; } >b : { new: (x: RegExp) => string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: RegExp) => string; }): any; (x: { new: (x: RegExp) => string; }): any; } >x : { new: (x: RegExp) => string; } >b : { new: (x: RegExp) => string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: RegExp) => string; }): any; (x: { new: (x: RegExp) => string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error, types are structurally equal ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: Date) => string): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: Date) => string): any; } >x : new (x: Date) => string >a : new (x: Date) => string function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: Date) => string): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: RegExp) => string; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: RegExp) => string; }): any; } >x : { new: (x: RegExp) => string; } >b : { new: (x: RegExp) => string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: RegExp) => string; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: Date) => string): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: Date) => string): any; } >x : new (x: Date) => string >a : new (x: Date) => string function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: Date) => string): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: RegExp) => string; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: RegExp) => string; }): any; } >x : { new: (x: RegExp) => string; } >b : { new: (x: RegExp) => string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: RegExp) => string; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.types b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.types index 615a1cd6e6b..e5598f874e0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.types +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.types @@ -50,198 +50,198 @@ var b = { new(x: string) { return ''; } }; // not a construct signature, functio >x : string function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: new (x: string, y: string) => string): any; (x: new (x: string, y: string) => string): any; } >x : new (x: string, y: string) => string >a : new (x: string, y: string) => string function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: new (x: string, y: string) => string): any; (x: new (x: string, y: string) => string): any; } >x : new (x: string, y: string) => string >a : new (x: string, y: string) => string function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: new (x: string, y: string) => string): any; (x: new (x: string, y: string) => string): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: string) => string; }): any; (x: { new: (x: string) => string; }): any; } >x : { new: (x: string) => string; } >b : { new: (x: string) => string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: string) => string; }): any; (x: { new: (x: string) => string; }): any; } >x : { new: (x: string) => string; } >b : { new: (x: string) => string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: string) => string; }): any; (x: { new: (x: string) => string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error, types are structurally equal ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: string, y: string) => string): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: string, y: string) => string): any; } >x : new (x: string, y: string) => string >a : new (x: string, y: string) => string function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: string, y: string) => string): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: string) => string; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: string) => string; }): any; } >x : { new: (x: string) => string; } >b : { new: (x: string) => string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: string) => string; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: string, y: string) => string): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: string, y: string) => string): any; } >x : new (x: string, y: string) => string >a : new (x: string, y: string) => string function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: string, y: string) => string): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: string) => string; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: string) => string; }): any; } >x : { new: (x: string) => string; } >b : { new: (x: string) => string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: string) => string; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.types index a6223aae995..240e12b1c22 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.types @@ -75,268 +75,268 @@ var b = { foo(x: T) { return x; } }; >x : T function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T): T; }): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T): T; }): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T): T; }): any; (x: { foo(x: T): T; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T) => T; }): any; (x: { foo: (x: T) => T; }): any; } >x : { foo: (x: T) => T; } >b : { foo: (x: T) => T; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T) => T; }): any; (x: { foo: (x: T) => T; }): any; } >x : { foo: (x: T) => T; } >b : { foo: (x: T) => T; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T) => T; }): any; (x: { foo: (x: T) => T; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T): T; }): any; } >x : A >A : A function foo7(x: typeof a); // error ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T): T; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T): T; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T): T; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T) => T; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T) => T; }): any; } >x : { foo: (x: T) => T; } >b : { foo: (x: T) => T; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T) => T; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T): T; }): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T): T; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T) => T; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T) => T; }): any; } >x : { foo: (x: T) => T; } >b : { foo: (x: T) => T; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T) => T; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.types index f3ecf95b1f8..932dbf7e9b3 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.types @@ -96,268 +96,268 @@ var b = { foo(x: T, y: U) { return x; } }; >x : T function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T, y: U): T; }): any; (x: { foo(x: T, y: U): T; }): any; } >x : { foo(x: T, y: U): T; } >a : { foo(x: T, y: U): T; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T, y: U): T; }): any; (x: { foo(x: T, y: U): T; }): any; } >x : { foo(x: T, y: U): T; } >a : { foo(x: T, y: U): T; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T, y: U): T; }): any; (x: { foo(x: T, y: U): T; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T, y: U) => T; }): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : { foo: (x: T, y: U) => T; } >b : { foo: (x: T, y: U) => T; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T, y: U) => T; }): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : { foo: (x: T, y: U) => T; } >b : { foo: (x: T, y: U) => T; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T, y: U) => T; }): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T, y: U): T; }): any; } >x : A >A : A function foo7(x: typeof a); // no error, bug? ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T, y: U): T; }): any; } >x : { foo(x: T, y: U): T; } >a : { foo(x: T, y: U): T; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T, y: U): T; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T, y: U): T; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T, y: U): T; }): any; } >x : { foo(x: T, y: U): T; } >a : { foo(x: T, y: U): T; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T, y: U): T; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : { foo: (x: T, y: U) => T; } >b : { foo: (x: T, y: U) => T; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T, y: U): T; }): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T, y: U): T; }): any; } >x : { foo(x: T, y: U): T; } >a : { foo(x: T, y: U): T; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T, y: U): T; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : { foo: (x: T, y: U) => T; } >b : { foo: (x: T, y: U) => T; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.types index a0a1ace5645..2a5ab2dfe70 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.types @@ -77,289 +77,289 @@ var b = { foo(x: T) { return ''; } }; >T : T function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B>); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B >Array : T[] function foo1b(x: B>); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B >Array : T[] function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C >String : String function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C >String : String function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I >Number : Number function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I >Number : Number function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T): string; }): any; (x: { foo(x: T): string; }): any; } >x : { foo(x: T): string; } >a : { foo(x: T): string; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T): string; }): any; (x: { foo(x: T): string; }): any; } >x : { foo(x: T): string; } >a : { foo(x: T): string; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T): string; }): any; (x: { foo(x: T): string; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T) => string; }): any; (x: { foo: (x: T) => string; }): any; } >x : { foo: (x: T) => string; } >b : { foo: (x: T) => string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T) => string; }): any; (x: { foo: (x: T) => string; }): any; } >x : { foo: (x: T) => string; } >b : { foo: (x: T) => string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T) => string; }): any; (x: { foo: (x: T) => string; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B>); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B >Array : T[] function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C >String : String function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I >Number : Number function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T): string; }): any; } >x : A >A : A function foo7(x: typeof a); // ok ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T): string; }): any; } >x : { foo(x: T): string; } >a : { foo(x: T): string; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T): string; }): any; } >x : any function foo8(x: B>); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B >Array : T[] function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I >Number : Number function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B>); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B >Array : T[] function foo9(x: C); // ok ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C >String : String function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B>); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T): string; }): any; } >x : B >B : B >Array : T[] function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T): string; }): any; } >x : { foo(x: T): string; } >a : { foo(x: T): string; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T): string; }): any; } >x : any function foo11(x: B>); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T) => string; }): any; } >x : B >B : B >Array : T[] function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T) => string; }): any; } >x : { foo: (x: T) => string; } >b : { foo: (x: T) => string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T) => string; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I >Number : Number function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C >String : String function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C >String : String function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T): string; }): any; } >x : I >I : I >Number : Number function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T): string; }): any; } >x : { foo(x: T): string; } >a : { foo(x: T): string; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T): string; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T) => string; }): any; } >x : I >I : I >Number : Number function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T) => string; }): any; } >x : { foo: (x: T) => string; } >b : { foo: (x: T) => string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T) => string; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C >String : String function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.types index d06da02469b..9de1a816ab7 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.types @@ -73,268 +73,268 @@ var b = { foo(x: T) { return null; } }; >T : T function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T): T; }): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T): T; }): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T): T; }): any; (x: { foo(x: T): T; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T) => any; }): any; (x: { foo: (x: T) => any; }): any; } >x : { foo: (x: T) => any; } >b : { foo: (x: T) => any; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T) => any; }): any; (x: { foo: (x: T) => any; }): any; } >x : { foo: (x: T) => any; } >b : { foo: (x: T) => any; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T) => any; }): any; (x: { foo: (x: T) => any; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T): T; }): any; } >x : A >A : A function foo7(x: typeof a); // ok ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T): T; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // ok ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T): T; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T): T; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T) => any; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T) => any; }): any; } >x : { foo: (x: T) => any; } >b : { foo: (x: T) => any; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T) => any; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T): T; }): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T): T; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T) => any; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T) => any; }): any; } >x : { foo: (x: T) => any; } >b : { foo: (x: T) => any; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T) => any; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.types index 710c440e2d0..f6f33890c07 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.types @@ -80,289 +80,289 @@ var b = { foo(x: T) { return null; } }; >T : T function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B >Date : Date function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B >Date : Date function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C >Date : Date function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C >Date : Date function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I >Date : Date function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I >Date : Date function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T): T; }): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T): T; }): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T): T; }): any; (x: { foo(x: T): T; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T) => any; }): any; (x: { foo: (x: T) => any; }): any; } >x : { foo: (x: T) => any; } >b : { foo: (x: T) => any; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T) => any; }): any; (x: { foo: (x: T) => any; }): any; } >x : { foo: (x: T) => any; } >b : { foo: (x: T) => any; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T) => any; }): any; (x: { foo: (x: T) => any; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B >Date : Date function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C >Date : Date function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I >Date : Date function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T): T; }): any; } >x : A >A : A function foo7(x: typeof a); // ok ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T): T; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B >Date : Date function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I >Date : Date function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B >Date : Date function foo9(x: C); // ok ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C >Date : Date function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T): T; }): any; } >x : B >B : B >Date : Date function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T): T; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T) => any; }): any; } >x : B >B : B >Date : Date function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T) => any; }): any; } >x : { foo: (x: T) => any; } >b : { foo: (x: T) => any; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T) => any; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I >Date : Date function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C >Date : Date function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C >Date : Date function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T): T; }): any; } >x : I >I : I >Date : Date function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T): T; }): any; } >x : { foo(x: T): T; } >a : { foo(x: T): T; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T): T; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T) => any; }): any; } >x : I >I : I >Date : Date function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T) => any; }): any; } >x : { foo: (x: T) => any; } >b : { foo: (x: T) => any; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T) => any; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C >Date : Date function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.types index dd8f28b684d..dbd6d3e7d03 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.types @@ -93,238 +93,238 @@ var b = { foo(x: A) { return x; } }; >x : A function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: Z): Z; }): any; (x: { foo(x: Z): Z; }): any; } >x : { foo(x: Z): Z; } >a : { foo(x: Z): Z; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: Z): Z; }): any; (x: { foo(x: Z): Z; }): any; } >x : { foo(x: Z): Z; } >a : { foo(x: Z): Z; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: Z): Z; }): any; (x: { foo(x: Z): Z; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: A) => A; }): any; (x: { foo: (x: A) => A; }): any; } >x : { foo: (x: A) => A; } >b : { foo: (x: A) => A; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: A) => A; }): any; (x: { foo: (x: A) => A; }): any; } >x : { foo: (x: A) => A; } >b : { foo: (x: A) => A; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: A) => A; }): any; (x: { foo: (x: A) => A; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I >Date : Date function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: Z): Z; }): any; } >x : A >A : A function foo7(x: typeof a); // no error, bug? ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: Z): Z; }): any; } >x : { foo(x: Z): Z; } >a : { foo(x: Z): Z; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: Z): Z; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I >Date : Date function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C>): any; } >x : B >B : B function foo9(x: C>); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C>): any; } >x : C> >C : C >B : B function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C>): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: Z): Z; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: Z): Z; }): any; } >x : { foo(x: Z): Z; } >a : { foo(x: Z): Z; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: Z): Z; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: A) => A; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: A) => A; }): any; } >x : { foo: (x: A) => A; } >b : { foo: (x: A) => A; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: A) => A; }): any; } >x : any function foo12(x: I, number, Date, string>); ->foo12 : typeof foo12 +>foo12 : { (x: I, number, Date, string>): any; (x: C, number, Date>): any; } >x : I, number, Date, string> >I : I >B : B >Date : Date function foo12(x: C, number, Date>); // error ->foo12 : typeof foo12 +>foo12 : { (x: I, number, Date, string>): any; (x: C, number, Date>): any; } >x : C, number, Date> >C : C >B : B >Date : Date function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I, number, Date, string>): any; (x: C, number, Date>): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: Z): Z; }): any; } >x : I >I : I >Date : Date @@ -332,43 +332,43 @@ function foo13(x: I); >Date : Date function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: Z): Z; }): any; } >x : { foo(x: Z): Z; } >a : { foo(x: Z): Z; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: Z): Z; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: A) => A; }): any; } >x : I >I : I >Date : Date >RegExp : RegExp function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: A) => A; }): any; } >x : { foo: (x: A) => A; } >b : { foo: (x: A) => A; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: A) => A; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C, B>): any; } >x : I2 >I2 : I2 function foo15(x: C, B>); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C, B>): any; } >x : C, B> >C : C >B : B >B : B function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C, B>): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.types index 0340ce46d6e..8cc0042cc9e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.types @@ -40,103 +40,103 @@ var a: { (x: Z): Z } >Z : Z function foo1(x: I); ->foo1 : typeof foo1 +>foo1 : { (x: I): any; (x: I): any; } >x : I >I : I function foo1(x: I); // error ->foo1 : typeof foo1 +>foo1 : { (x: I): any; (x: I): any; } >x : I >I : I function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: I): any; (x: I): any; } >x : any function foo2(x: I2); ->foo2 : typeof foo2 +>foo2 : { (x: I2): any; (x: I2): any; } >x : I2 >I2 : I2 function foo2(x: I2); // error ->foo2 : typeof foo2 +>foo2 : { (x: I2): any; (x: I2): any; } >x : I2 >I2 : I2 function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I2): any; (x: I2): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: (x: Z) => Z): any; (x: (x: Z) => Z): any; } >x : (x: Z) => Z >a : (x: Z) => Z function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: (x: Z) => Z): any; (x: (x: Z) => Z): any; } >x : (x: Z) => Z >a : (x: Z) => Z function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: (x: Z) => Z): any; (x: (x: Z) => Z): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: (x: Z) => Z): any; } >x : I >I : I >Date : Date function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: (x: Z) => Z): any; } >x : (x: Z) => Z >a : (x: Z) => Z function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: (x: Z) => Z): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: I2): any; } >x : I >I : I >Date : Date function foo14(x: I2); // error ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: I2): any; } >x : I2 >I2 : I2 function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: I2): any; } >x : any function foo14b(x: typeof a); ->foo14b : typeof foo14b +>foo14b : { (x: (x: Z) => Z): any; (x: I2): any; } >x : (x: Z) => Z >a : (x: Z) => Z function foo14b(x: I2); // ok ->foo14b : typeof foo14b +>foo14b : { (x: (x: Z) => Z): any; (x: I2): any; } >x : I2 >I2 : I2 function foo14b(x: any) { } ->foo14b : typeof foo14b +>foo14b : { (x: (x: Z) => Z): any; (x: I2): any; } >x : any function foo15(x: I); ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: I2): any; } >x : I >I : I >Date : Date function foo15(x: I2); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: I2): any; } >x : I2 >I2 : I2 function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: I2): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.types index 7c90a214fff..85e83528cd0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.types @@ -75,268 +75,268 @@ var b = { foo(x: A) { return x; } }; >x : A function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: Z): Z; }): any; (x: { foo(x: Z): Z; }): any; } >x : { foo(x: Z): Z; } >a : { foo(x: Z): Z; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: Z): Z; }): any; (x: { foo(x: Z): Z; }): any; } >x : { foo(x: Z): Z; } >a : { foo(x: Z): Z; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: Z): Z; }): any; (x: { foo(x: Z): Z; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: A) => A; }): any; (x: { foo: (x: A) => A; }): any; } >x : { foo: (x: A) => A; } >b : { foo: (x: A) => A; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: A) => A; }): any; (x: { foo: (x: A) => A; }): any; } >x : { foo: (x: A) => A; } >b : { foo: (x: A) => A; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: A) => A; }): any; (x: { foo: (x: A) => A; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: Z): Z; }): any; } >x : A >A : A function foo7(x: typeof a); // error ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: Z): Z; }): any; } >x : { foo(x: Z): Z; } >a : { foo(x: Z): Z; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: Z): Z; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: Z): Z; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: Z): Z; }): any; } >x : { foo(x: Z): Z; } >a : { foo(x: Z): Z; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: Z): Z; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: A) => A; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: A) => A; }): any; } >x : { foo: (x: A) => A; } >b : { foo: (x: A) => A; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: A) => A; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: Z): Z; }): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: Z): Z; }): any; } >x : { foo(x: Z): Z; } >a : { foo(x: Z): Z; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: Z): Z; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: A) => A; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: A) => A; }): any; } >x : { foo: (x: A) => A; } >b : { foo: (x: A) => A; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: A) => A; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.types index c0bcf8e394c..bef916fc410 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.types @@ -91,268 +91,268 @@ var b = { foo(x: T, y?: T) { return x; } }; >x : T function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T, y?: T): T; }): any; (x: { foo(x: T, y?: T): T; }): any; } >x : { foo(x: T, y?: T): T; } >a : { foo(x: T, y?: T): T; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T, y?: T): T; }): any; (x: { foo(x: T, y?: T): T; }): any; } >x : { foo(x: T, y?: T): T; } >a : { foo(x: T, y?: T): T; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T, y?: T): T; }): any; (x: { foo(x: T, y?: T): T; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T, y?: T) => T; }): any; (x: { foo: (x: T, y?: T) => T; }): any; } >x : { foo: (x: T, y?: T) => T; } >b : { foo: (x: T, y?: T) => T; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T, y?: T) => T; }): any; (x: { foo: (x: T, y?: T) => T; }): any; } >x : { foo: (x: T, y?: T) => T; } >b : { foo: (x: T, y?: T) => T; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T, y?: T) => T; }): any; (x: { foo: (x: T, y?: T) => T; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T, y?: T): T; }): any; } >x : A >A : A function foo7(x: typeof a); // no error, bug? ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T, y?: T): T; }): any; } >x : { foo(x: T, y?: T): T; } >a : { foo(x: T, y?: T): T; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T, y?: T): T; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T, y?: T): T; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T, y?: T): T; }): any; } >x : { foo(x: T, y?: T): T; } >a : { foo(x: T, y?: T): T; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T, y?: T): T; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T, y?: T) => T; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T, y?: T) => T; }): any; } >x : { foo: (x: T, y?: T) => T; } >b : { foo: (x: T, y?: T) => T; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T, y?: T) => T; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T, y?: T): T; }): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T, y?: T): T; }): any; } >x : { foo(x: T, y?: T): T; } >a : { foo(x: T, y?: T): T; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T, y?: T): T; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T, y?: T) => T; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T, y?: T) => T; }): any; } >x : { foo: (x: T, y?: T) => T; } >b : { foo: (x: T, y?: T) => T; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T, y?: T) => T; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.types index cbf9db01907..c8a4ad6be29 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.types @@ -98,268 +98,268 @@ var b = { foo(x: T, y?: U) { return x; } }; >x : T function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T, y?: U): T; }): any; (x: { foo(x: T, y?: U): T; }): any; } >x : { foo(x: T, y?: U): T; } >a : { foo(x: T, y?: U): T; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T, y?: U): T; }): any; (x: { foo(x: T, y?: U): T; }): any; } >x : { foo(x: T, y?: U): T; } >a : { foo(x: T, y?: U): T; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T, y?: U): T; }): any; (x: { foo(x: T, y?: U): T; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T, y?: U) => T; }): any; (x: { foo: (x: T, y?: U) => T; }): any; } >x : { foo: (x: T, y?: U) => T; } >b : { foo: (x: T, y?: U) => T; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T, y?: U) => T; }): any; (x: { foo: (x: T, y?: U) => T; }): any; } >x : { foo: (x: T, y?: U) => T; } >b : { foo: (x: T, y?: U) => T; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T, y?: U) => T; }): any; (x: { foo: (x: T, y?: U) => T; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T, y?: U): T; }): any; } >x : A >A : A function foo7(x: typeof a); // no error, bug? ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T, y?: U): T; }): any; } >x : { foo(x: T, y?: U): T; } >a : { foo(x: T, y?: U): T; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T, y?: U): T; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T, y?: U): T; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T, y?: U): T; }): any; } >x : { foo(x: T, y?: U): T; } >a : { foo(x: T, y?: U): T; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T, y?: U): T; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T, y?: U) => T; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T, y?: U) => T; }): any; } >x : { foo: (x: T, y?: U) => T; } >b : { foo: (x: T, y?: U) => T; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T, y?: U) => T; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T, y?: U): T; }): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T, y?: U): T; }): any; } >x : { foo(x: T, y?: U): T; } >a : { foo(x: T, y?: U): T; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T, y?: U): T; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T, y?: U) => T; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T, y?: U) => T; }): any; } >x : { foo: (x: T, y?: U) => T; } >b : { foo: (x: T, y?: U) => T; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T, y?: U) => T; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.types b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.types index f03e7b89ce6..06c23dcd0b1 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.types @@ -98,268 +98,268 @@ var b = { foo(x: T, y: U) { return x; } }; >x : T function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T, y?: U): T; }): any; (x: { foo(x: T, y?: U): T; }): any; } >x : { foo(x: T, y?: U): T; } >a : { foo(x: T, y?: U): T; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T, y?: U): T; }): any; (x: { foo(x: T, y?: U): T; }): any; } >x : { foo(x: T, y?: U): T; } >a : { foo(x: T, y?: U): T; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo(x: T, y?: U): T; }): any; (x: { foo(x: T, y?: U): T; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T, y: U) => T; }): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : { foo: (x: T, y: U) => T; } >b : { foo: (x: T, y: U) => T; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T, y: U) => T; }): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : { foo: (x: T, y: U) => T; } >b : { foo: (x: T, y: U) => T; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: (x: T, y: U) => T; }): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T, y?: U): T; }): any; } >x : A >A : A function foo7(x: typeof a); // no error, bug? ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T, y?: U): T; }): any; } >x : { foo(x: T, y?: U): T; } >a : { foo(x: T, y?: U): T; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo(x: T, y?: U): T; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // ok ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T, y?: U): T; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T, y?: U): T; }): any; } >x : { foo(x: T, y?: U): T; } >a : { foo(x: T, y?: U): T; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo(x: T, y?: U): T; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : { foo: (x: T, y: U) => T; } >b : { foo: (x: T, y: U) => T; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T, y?: U): T; }): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T, y?: U): T; }): any; } >x : { foo(x: T, y?: U): T; } >a : { foo(x: T, y?: U): T; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo(x: T, y?: U): T; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : { foo: (x: T, y: U) => T; } >b : { foo: (x: T, y: U) => T; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: (x: T, y: U) => T; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.types index 5a9db264031..8a41814e1a9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.types @@ -61,201 +61,201 @@ var b = { new(x: T) { return ''; } }; // not a construct signa >T : T function foo1b(x: B>); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B >Array : T[] function foo1b(x: B>); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B >Array : T[] function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C >String : String function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C >String : String function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I >Number : Number function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I >Number : Number function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T) => string): any; (x: new (x: T) => string): any; } >x : new (x: T) => string >a : new (x: T) => string function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T) => string): any; (x: new (x: T) => string): any; } >x : new (x: T) => string >a : new (x: T) => string function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T) => string): any; (x: new (x: T) => string): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T) => string; }): any; (x: { new: (x: T) => string; }): any; } >x : { new: (x: T) => string; } >b : { new: (x: T) => string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T) => string; }): any; (x: { new: (x: T) => string; }): any; } >x : { new: (x: T) => string; } >b : { new: (x: T) => string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T) => string; }): any; (x: { new: (x: T) => string; }): any; } >x : any function foo8(x: B>); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B >Array : T[] function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I >Number : Number function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B>); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B >Array : T[] function foo9(x: C); // error, types are structurally equal ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C >String : String function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B>); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T) => string): any; } >x : B >B : B >Array : T[] function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T) => string): any; } >x : new (x: T) => string >a : new (x: T) => string function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T) => string): any; } >x : any function foo11(x: B>); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T) => string; }): any; } >x : B >B : B >Array : T[] function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T) => string; }): any; } >x : { new: (x: T) => string; } >b : { new: (x: T) => string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T) => string; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I >Number : Number function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C >String : String function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C >String : String function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T) => string): any; } >x : I >I : I >Number : Number function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T) => string): any; } >x : new (x: T) => string >a : new (x: T) => string function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T) => string): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T) => string; }): any; } >x : I >I : I >Number : Number function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T) => string; }): any; } >x : { new: (x: T) => string; } >b : { new: (x: T) => string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T) => string; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.types index c07d0e2430f..1eac69f7f23 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.types @@ -59,212 +59,212 @@ var b = { new(x: T): T { return null; } }; // not a construct signature, func >T : T function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T) => T): any; (x: new (x: T) => T): any; } >x : new (x: T) => T >a : new (x: T) => T function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T) => T): any; (x: new (x: T) => T): any; } >x : new (x: T) => T >a : new (x: T) => T function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T) => T): any; (x: new (x: T) => T): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T) => T; }): any; (x: { new: (x: T) => T; }): any; } >x : { new: (x: T) => T; } >b : { new: (x: T) => T; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T) => T; }): any; (x: { new: (x: T) => T; }): any; } >x : { new: (x: T) => T; } >b : { new: (x: T) => T; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T) => T; }): any; (x: { new: (x: T) => T; }): any; } >x : any function foo5(x: typeof a): number; ->foo5 : typeof foo5 +>foo5 : { (x: new (x: T) => T): number; (x: { new: (x: T) => T; }): string; } >x : new (x: T) => T >a : new (x: T) => T function foo5(x: typeof b): string; // ok ->foo5 : typeof foo5 +>foo5 : { (x: new (x: T) => T): number; (x: { new: (x: T) => T; }): string; } >x : { new: (x: T) => T; } >b : { new: (x: T) => T; } function foo5(x: any): any { } ->foo5 : typeof foo5 +>foo5 : { (x: new (x: T) => T): number; (x: { new: (x: T) => T; }): string; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error since types are structurally equal ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T) => T): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T) => T): any; } >x : new (x: T) => T >a : new (x: T) => T function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T) => T): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T) => T; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T) => T; }): any; } >x : { new: (x: T) => T; } >b : { new: (x: T) => T; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T) => T; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T) => T): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T) => T): any; } >x : new (x: T) => T >a : new (x: T) => T function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T) => T): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T) => T; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T) => T; }): any; } >x : { new: (x: T) => T; } >b : { new: (x: T) => T; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T) => T; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.types index 80086f62f9c..308f592ef12 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.types @@ -64,216 +64,216 @@ var b = { new(x: T) { return null; } }; // not a construct signa >T : T function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B >Date : Date function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B >Date : Date function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C >Date : Date function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C >Date : Date function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I >Date : Date function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I >Date : Date function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T) => T): any; (x: new (x: T) => T): any; } >x : new (x: T) => T >a : new (x: T) => T function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T) => T): any; (x: new (x: T) => T): any; } >x : new (x: T) => T >a : new (x: T) => T function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T) => T): any; (x: new (x: T) => T): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T) => any; }): any; (x: { new: (x: T) => any; }): any; } >x : { new: (x: T) => any; } >b : { new: (x: T) => any; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T) => any; }): any; (x: { new: (x: T) => any; }): any; } >x : { new: (x: T) => any; } >b : { new: (x: T) => any; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T) => any; }): any; (x: { new: (x: T) => any; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B >Date : Date function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I >Date : Date function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B >Date : Date function foo9(x: C); // error since types are structurally equal ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C >Date : Date function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T) => T): any; } >x : B >B : B >Date : Date function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T) => T): any; } >x : new (x: T) => T >a : new (x: T) => T function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T) => T): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T) => any; }): any; } >x : B >B : B >Date : Date function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T) => any; }): any; } >x : { new: (x: T) => any; } >b : { new: (x: T) => any; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T) => any; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I >Date : Date function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C >Date : Date function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C >Date : Date function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T) => T): any; } >x : I >I : I >Date : Date function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T) => T): any; } >x : new (x: T) => T >a : new (x: T) => T function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T) => T): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T) => any; }): any; } >x : I >I : I >Date : Date function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T) => any; }): any; } >x : { new: (x: T) => any; } >b : { new: (x: T) => any; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T) => any; }): any; } >x : any function foo15(x: I2); ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo15(x: C); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : C >C : C >Date : Date function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I2): any; (x: C): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.types index 52cee1f5bcd..0276458ea91 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.types @@ -83,167 +83,167 @@ var b = { new(x: A) { return x; } }; >x : A function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: new (x: Z) => C): any; (x: new (x: Z) => C): any; } >x : new (x: Z) => C >a : new (x: Z) => C function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: new (x: Z) => C): any; (x: new (x: Z) => C): any; } >x : new (x: Z) => C >a : new (x: Z) => C function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: new (x: Z) => C): any; (x: new (x: Z) => C): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: A) => A; }): any; (x: { new: (x: A) => A; }): any; } >x : { new: (x: A) => A; } >b : { new: (x: A) => A; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: A) => A; }): any; (x: { new: (x: A) => A; }): any; } >x : { new: (x: A) => A; } >b : { new: (x: A) => A; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: A) => A; }): any; (x: { new: (x: A) => A; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // BUG 832086 ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I >Date : Date function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C>): any; } >x : B >B : B function foo9(x: C>); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C>): any; } >x : C> >C : C >B : B function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C>): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: Z) => C): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: Z) => C): any; } >x : new (x: Z) => C >a : new (x: Z) => C function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: Z) => C): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: A) => A; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: A) => A; }): any; } >x : { new: (x: A) => A; } >b : { new: (x: A) => A; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: A) => A; }): any; } >x : any function foo12(x: I, number, Date, string>); ->foo12 : typeof foo12 +>foo12 : { (x: I, number, Date, string>): any; (x: C, number, Date>): any; } >x : I, number, Date, string> >I : I >B : B >Date : Date function foo12(x: C, number, Date>); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I, number, Date, string>): any; (x: C, number, Date>): any; } >x : C, number, Date> >C : C >B : B >Date : Date function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I, number, Date, string>): any; (x: C, number, Date>): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // BUG 832086 ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: Z) => C): any; } >x : I >I : I >Date : Date @@ -251,27 +251,27 @@ function foo13(x: I); >Date : Date function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: Z) => C): any; } >x : new (x: Z) => C >a : new (x: Z) => C function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: Z) => C): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: A) => A; }): any; } >x : I >I : I >Date : Date >RegExp : RegExp function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: A) => A; }): any; } >x : { new: (x: A) => A; } >b : { new: (x: A) => A; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: A) => A; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.types index a1c1e1aca99..10a8da26907 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.types @@ -63,184 +63,184 @@ var b = { new(x: A) { return new C(x); } }; >x : A function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: new (x: Z) => B): any; (x: new (x: Z) => B): any; } >x : new (x: Z) => B >a : new (x: Z) => B function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: new (x: Z) => B): any; (x: new (x: Z) => B): any; } >x : new (x: Z) => B >a : new (x: Z) => B function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: new (x: Z) => B): any; (x: new (x: Z) => B): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: A) => C; }): any; (x: { new: (x: A) => C; }): any; } >x : { new: (x: A) => C; } >b : { new: (x: A) => C; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: A) => C; }): any; (x: { new: (x: A) => C; }): any; } >x : { new: (x: A) => C; } >b : { new: (x: A) => C; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: A) => C; }): any; (x: { new: (x: A) => C; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // BUG 832086 ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: Z) => B): any; } >x : B >B : B function foo10(x: typeof a); // BUG 832086 ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: Z) => B): any; } >x : new (x: Z) => B >a : new (x: Z) => B function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: Z) => B): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: A) => C; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: A) => C; }): any; } >x : { new: (x: A) => C; } >b : { new: (x: A) => C; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: A) => C; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // BUG 832086 ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: Z) => B): any; } >x : I >I : I function foo13(x: typeof a); // BUG 832086 ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: Z) => B): any; } >x : new (x: Z) => B >a : new (x: Z) => B function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: Z) => B): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: A) => C; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: A) => C; }): any; } >x : { new: (x: A) => C; } >b : { new: (x: A) => C; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: A) => C; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.types index 9da0c3ae436..28ef6a81505 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.types @@ -78,184 +78,184 @@ var b = { new(x: T, y?: T) { return new C(x, y); } }; // not a construct s >y : T function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T, y?: T) => B): any; (x: new (x: T, y?: T) => B): any; } >x : new (x: T, y?: T) => B >a : new (x: T, y?: T) => B function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T, y?: T) => B): any; (x: new (x: T, y?: T) => B): any; } >x : new (x: T, y?: T) => B >a : new (x: T, y?: T) => B function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T, y?: T) => B): any; (x: new (x: T, y?: T) => B): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T, y?: T) => C; }): any; (x: { new: (x: T, y?: T) => C; }): any; } >x : { new: (x: T, y?: T) => C; } >b : { new: (x: T, y?: T) => C; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T, y?: T) => C; }): any; (x: { new: (x: T, y?: T) => C; }): any; } >x : { new: (x: T, y?: T) => C; } >b : { new: (x: T, y?: T) => C; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T, y?: T) => C; }): any; (x: { new: (x: T, y?: T) => C; }): any; } >x : any function foo8(x: B): string; ->foo8 : typeof foo8 +>foo8 : { (x: B): string; (x: I): number; } >x : B >B : B function foo8(x: I): number; // BUG 832086 ->foo8 : typeof foo8 +>foo8 : { (x: B): string; (x: I): number; } >x : I >I : I function foo8(x: any): any { } ->foo8 : typeof foo8 +>foo8 : { (x: B): string; (x: I): number; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error, differ only by return type ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T, y?: T) => B): any; } >x : B >B : B function foo10(x: typeof a); // BUG 832086 ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T, y?: T) => B): any; } >x : new (x: T, y?: T) => B >a : new (x: T, y?: T) => B function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T, y?: T) => B): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T, y?: T) => C; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T, y?: T) => C; }): any; } >x : { new: (x: T, y?: T) => C; } >b : { new: (x: T, y?: T) => C; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T, y?: T) => C; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // BUG 832086 ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T, y?: T) => B): any; } >x : I >I : I function foo13(x: typeof a); // BUG 832086 ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T, y?: T) => B): any; } >x : new (x: T, y?: T) => B >a : new (x: T, y?: T) => B function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T, y?: T) => B): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T, y?: T) => C; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T, y?: T) => C; }): any; } >x : { new: (x: T, y?: T) => C; } >b : { new: (x: T, y?: T) => C; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T, y?: T) => C; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.types index 1a500ad8a62..e75f1ce7cbb 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.types @@ -88,184 +88,184 @@ var b = { new(x: T, y?: U) { return new C(x, y); } }; // not a const >y : U function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T, y?: U) => B): any; (x: new (x: T, y?: U) => B): any; } >x : new (x: T, y?: U) => B >a : new (x: T, y?: U) => B function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T, y?: U) => B): any; (x: new (x: T, y?: U) => B): any; } >x : new (x: T, y?: U) => B >a : new (x: T, y?: U) => B function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T, y?: U) => B): any; (x: new (x: T, y?: U) => B): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T, y?: U) => C; }): any; (x: { new: (x: T, y?: U) => C; }): any; } >x : { new: (x: T, y?: U) => C; } >b : { new: (x: T, y?: U) => C; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T, y?: U) => C; }): any; (x: { new: (x: T, y?: U) => C; }): any; } >x : { new: (x: T, y?: U) => C; } >b : { new: (x: T, y?: U) => C; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T, y?: U) => C; }): any; (x: { new: (x: T, y?: U) => C; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // BUG 832086 ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T, y?: U) => B): any; } >x : B >B : B function foo10(x: typeof a); // BUG 832086 ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T, y?: U) => B): any; } >x : new (x: T, y?: U) => B >a : new (x: T, y?: U) => B function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T, y?: U) => B): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T, y?: U) => C; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T, y?: U) => C; }): any; } >x : { new: (x: T, y?: U) => C; } >b : { new: (x: T, y?: U) => C; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T, y?: U) => C; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // BUG 832086 ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // ok ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T, y?: U) => B): any; } >x : I >I : I function foo13(x: typeof a); // BUG 832086 ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T, y?: U) => B): any; } >x : new (x: T, y?: U) => B >a : new (x: T, y?: U) => B function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T, y?: U) => B): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T, y?: U) => C; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T, y?: U) => C; }): any; } >x : { new: (x: T, y?: U) => C; } >b : { new: (x: T, y?: U) => C; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T, y?: U) => C; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.types index 1fd61d4cf8c..5f5d592df34 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.types @@ -88,184 +88,184 @@ var b = { new(x: T, y: U) { return new C(x, y); } }; // not a constr >y : U function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T, y?: U) => B): any; (x: new (x: T, y?: U) => B): any; } >x : new (x: T, y?: U) => B >a : new (x: T, y?: U) => B function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T, y?: U) => B): any; (x: new (x: T, y?: U) => B): any; } >x : new (x: T, y?: U) => B >a : new (x: T, y?: U) => B function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: new (x: T, y?: U) => B): any; (x: new (x: T, y?: U) => B): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T, y: U) => C; }): any; (x: { new: (x: T, y: U) => C; }): any; } >x : { new: (x: T, y: U) => C; } >b : { new: (x: T, y: U) => C; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T, y: U) => C; }): any; (x: { new: (x: T, y: U) => C; }): any; } >x : { new: (x: T, y: U) => C; } >b : { new: (x: T, y: U) => C; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { new: (x: T, y: U) => C; }): any; (x: { new: (x: T, y: U) => C; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // BUG 832086 ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error, differ only by return type ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T, y?: U) => B): any; } >x : B >B : B function foo10(x: typeof a); // BUG 832086 ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T, y?: U) => B): any; } >x : new (x: T, y?: U) => B >a : new (x: T, y?: U) => B function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: new (x: T, y?: U) => B): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T, y: U) => C; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T, y: U) => C; }): any; } >x : { new: (x: T, y: U) => C; } >b : { new: (x: T, y: U) => C; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { new: (x: T, y: U) => C; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo12b(x: I2); ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : I2 >I2 : I2 function foo12b(x: C); // BUG 832086 ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : C >C : C function foo12b(x: any) { } ->foo12b : typeof foo12b +>foo12b : { (x: I2): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T, y?: U) => B): any; } >x : I >I : I function foo13(x: typeof a); // BUG 832086 ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T, y?: U) => B): any; } >x : new (x: T, y?: U) => B >a : new (x: T, y?: U) => B function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: new (x: T, y?: U) => B): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T, y: U) => C; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T, y: U) => C; }): any; } >x : { new: (x: T, y: U) => C; } >b : { new: (x: T, y: U) => C; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { new: (x: T, y: U) => C; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.types b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.types index 7182fd542de..ab83b0c78f0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.types +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.types @@ -54,325 +54,325 @@ var b: { [x: number]: string; } = { foo: '' }; >foo : string function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { [x: number]: string; }): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >a : { [x: number]: string; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { [x: number]: string; }): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >a : { [x: number]: string; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { [x: number]: string; }): any; (x: { [x: number]: string; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { [x: number]: string; }): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >b : { [x: number]: string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { [x: number]: string; }): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >b : { [x: number]: string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { [x: number]: string; }): any; (x: { [x: number]: string; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // error ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // error ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo5c(x: A); ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : A >A : A function foo5c(x: PA); // error ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : PA >PA : PA function foo5c(x: any) { } ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : any function foo5d(x: A); ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : A >A : A function foo5d(x: PB); // error ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : PB >PB : PB function foo5d(x: any) { } ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // error ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: number]: string; }): any; } >x : A >A : A function foo7(x: typeof a); // error ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >a : { [x: number]: string; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: number]: string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: number]: string; }): any; } >x : B >B : B function foo10(x: typeof a); // error ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >a : { [x: number]: string; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: number]: string; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: number]: string; }): any; } >x : B >B : B function foo11(x: typeof b); // error ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >b : { [x: number]: string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: number]: string; }): any; } >x : any function foo11b(x: B); ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : B >B : B function foo11b(x: PA); // error ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : PA >PA : PA function foo11b(x: any) { } ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : any function foo11c(x: B); ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : B >B : B function foo11c(x: PB); // error ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : PB >PB : PB function foo11c(x: any) { } ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: number]: string; }): any; } >x : I >I : I function foo13(x: typeof a); // error ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >a : { [x: number]: string; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: number]: string; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: number]: string; }): any; } >x : I >I : I function foo14(x: typeof b); // error ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >b : { [x: number]: string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: number]: string; }): any; } >x : any function foo15(x: I); ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : I >I : I function foo15(x: PA); // error ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : PA >PA : PA function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : any function foo16(x: I); ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : I >I : I function foo16(x: PB); // error ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : PB >PB : PB function foo16(x: any) { } ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.types b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.types index dc5616ebba6..cd8f19b2b7e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.types +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.types @@ -70,328 +70,328 @@ var b: { [x: number]: Derived; } = { foo: null }; >Derived : Derived function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { [x: number]: Base; }): any; (x: { [x: number]: Base; }): any; } >x : { [x: number]: Base; } >a : { [x: number]: Base; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { [x: number]: Base; }): any; (x: { [x: number]: Base; }): any; } >x : { [x: number]: Base; } >a : { [x: number]: Base; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { [x: number]: Base; }): any; (x: { [x: number]: Base; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { [x: number]: Derived; }): any; (x: { [x: number]: Derived; }): any; } >x : { [x: number]: Derived; } >b : { [x: number]: Derived; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { [x: number]: Derived; }): any; (x: { [x: number]: Derived; }): any; } >x : { [x: number]: Derived; } >b : { [x: number]: Derived; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { [x: number]: Derived; }): any; (x: { [x: number]: Derived; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C >Derived : Derived function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo5c(x: A); ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : A >A : A function foo5c(x: PA); // error ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : PA >PA : PA function foo5c(x: any) { } ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : any function foo5d(x: A); ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : A >A : A function foo5d(x: PB); // ok ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : PB >PB : PB function foo5d(x: any) { } ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: number]: Base; }): any; } >x : A >A : A function foo7(x: typeof a); // error ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: number]: Base; }): any; } >x : { [x: number]: Base; } >a : { [x: number]: Base; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: number]: Base; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // ok ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C >Base : Base function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: number]: Base; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: number]: Base; }): any; } >x : { [x: number]: Base; } >a : { [x: number]: Base; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: number]: Base; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: number]: Derived; }): any; } >x : B >B : B function foo11(x: typeof b); // error ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: number]: Derived; }): any; } >x : { [x: number]: Derived; } >b : { [x: number]: Derived; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: number]: Derived; }): any; } >x : any function foo11b(x: B); ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : B >B : B function foo11b(x: PA); // ok ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : PA >PA : PA function foo11b(x: any) { } ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : any function foo11c(x: B); ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : B >B : B function foo11c(x: PB); // error ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : PB >PB : PB function foo11c(x: any) { } ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C >Derived : Derived function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: number]: Base; }): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: number]: Base; }): any; } >x : { [x: number]: Base; } >a : { [x: number]: Base; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: number]: Base; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: number]: Derived; }): any; } >x : I >I : I function foo14(x: typeof b); // error ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: number]: Derived; }): any; } >x : { [x: number]: Derived; } >b : { [x: number]: Derived; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: number]: Derived; }): any; } >x : any function foo15(x: I); ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : I >I : I function foo15(x: PA); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : PA >PA : PA function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : any function foo16(x: I); ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : I >I : I function foo16(x: PB); // error ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : PB >PB : PB function foo16(x: any) { } ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.types b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.types index d62a05d7e23..6a73749fc84 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.types +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.types @@ -54,325 +54,325 @@ var b: { [x: number]: string; } = { foo: '' }; >foo : string function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { [x: string]: string; }): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >a : { [x: string]: string; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { [x: string]: string; }): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >a : { [x: string]: string; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { [x: string]: string; }): any; (x: { [x: string]: string; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { [x: number]: string; }): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >b : { [x: number]: string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { [x: number]: string; }): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >b : { [x: number]: string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { [x: number]: string; }): any; (x: { [x: number]: string; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // error ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo5c(x: A); ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : A >A : A function foo5c(x: PA); // error ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : PA >PA : PA function foo5c(x: any) { } ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : any function foo5d(x: A); ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : A >A : A function foo5d(x: PB); // ok ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : PB >PB : PB function foo5d(x: any) { } ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: string]: string; }): any; } >x : A >A : A function foo7(x: typeof a); // ok ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >a : { [x: string]: string; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: string]: string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // ok ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: string]: string; }): any; } >x : B >B : B function foo10(x: typeof a); // error ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >a : { [x: string]: string; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: string]: string; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: number]: string; }): any; } >x : B >B : B function foo11(x: typeof b); // ok ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >b : { [x: number]: string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: number]: string; }): any; } >x : any function foo11b(x: B); ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : B >B : B function foo11b(x: PA); // ok ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : PA >PA : PA function foo11b(x: any) { } ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : any function foo11c(x: B); ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : B >B : B function foo11c(x: PB); // error ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : PB >PB : PB function foo11c(x: any) { } ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: string]: string; }): any; } >x : I >I : I function foo13(x: typeof a); // error ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >a : { [x: string]: string; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: string]: string; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: number]: string; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: number]: string; }): any; } >x : { [x: number]: string; } >b : { [x: number]: string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: number]: string; }): any; } >x : any function foo15(x: I); ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : I >I : I function foo15(x: PA); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : PA >PA : PA function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : any function foo16(x: I); ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : I >I : I function foo16(x: PB); // error ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : PB >PB : PB function foo16(x: any) { } ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithOptionality.types b/tests/baselines/reference/objectTypesIdentityWithOptionality.types index 4a762d39fac..0ca5b552bf5 100644 --- a/tests/baselines/reference/objectTypesIdentityWithOptionality.types +++ b/tests/baselines/reference/objectTypesIdentityWithOptionality.types @@ -41,128 +41,128 @@ var b = { foo: '' }; >foo : string function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo?: string; }): any; (x: { foo?: string; }): any; } >x : { foo?: string; } >a : { foo?: string; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo?: string; }): any; (x: { foo?: string; }): any; } >x : { foo?: string; } >a : { foo?: string; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo?: string; }): any; (x: { foo?: string; }): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo?: string; }): any; } >x : A >A : A function foo7(x: typeof a); // ok ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo?: string; }): any; } >x : { foo?: string; } >a : { foo?: string; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo?: string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // ok ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo?: string; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo?: string; }): any; } >x : { foo?: string; } >a : { foo?: string; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo?: string; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // ok ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo?: string; }): any; } >x : I >I : I function foo13(x: typeof a); // error ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo?: string; }): any; } >x : { foo?: string; } >a : { foo?: string; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo?: string; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: string; }): any; } >x : I >I : I function foo14(x: typeof b); // ok ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: string; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.types b/tests/baselines/reference/objectTypesIdentityWithPrivates.types index 6bd61edbacf..391f6f1f200 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.types +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.types @@ -51,325 +51,325 @@ var b = { foo: '' }; >foo : string function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // no error ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // no error ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo5c(x: A); ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : A >A : A function foo5c(x: PA); // error ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : PA >PA : PA function foo5c(x: any) { } ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : any function foo5d(x: A); ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : A >A : A function foo5d(x: PB); // no error ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : PB >PB : PB function foo5d(x: any) { } ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // no error ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo: string; }): any; } >x : A >A : A function foo7(x: typeof a); // no error ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo: string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // no error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // no error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo: string; }): any; } >x : B >B : B function foo10(x: typeof a); // no error ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo: string; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: string; }): any; } >x : B >B : B function foo11(x: typeof b); // no error ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: string; }): any; } >x : any function foo11b(x: B); ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : B >B : B function foo11b(x: PA); // no error ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : PA >PA : PA function foo11b(x: any) { } ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : any function foo11c(x: B); ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : B >B : B function foo11c(x: PB); // error ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : PB >PB : PB function foo11c(x: any) { } ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // no error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo: string; }): any; } >x : I >I : I function foo13(x: typeof a); // error ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo: string; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: string; }): any; } >x : I >I : I function foo14(x: typeof b); // error ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: string; }): any; } >x : any function foo15(x: I); ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : I >I : I function foo15(x: PA); // no error ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : PA >PA : PA function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : any function foo16(x: I); ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : I >I : I function foo16(x: PB); // no error ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : PB >PB : PB function foo16(x: any) { } ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.types b/tests/baselines/reference/objectTypesIdentityWithPrivates2.types index 2756ce4a327..a29edc75162 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.types +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.types @@ -18,101 +18,101 @@ class D extends C { } function foo1(x: C); ->foo1 : typeof foo1 +>foo1 : { (x: C): any; (x: C): any; } >x : C >C : C function foo1(x: C); // ok ->foo1 : typeof foo1 +>foo1 : { (x: C): any; (x: C): any; } >x : C >C : C function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: C): any; (x: C): any; } >x : any function foo2(x: D); ->foo2 : typeof foo2 +>foo2 : { (x: D): any; (x: D): any; } >x : D >D : D function foo2(x: D); // ok ->foo2 : typeof foo2 +>foo2 : { (x: D): any; (x: D): any; } >x : D >D : D function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: D): any; (x: D): any; } >x : any function foo3(x: C); ->foo3 : typeof foo3 +>foo3 : { (x: C): any; (x: D): any; } >x : C >C : C function foo3(x: D); // ok ->foo3 : typeof foo3 +>foo3 : { (x: C): any; (x: D): any; } >x : D >D : D function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: C): any; (x: D): any; } >x : any function foo4(x: C): number; ->foo4 : typeof foo4 +>foo4 : { (x: C): number; (x: D): string; } >x : C >C : C function foo4(x: D): string; // BUG 831926 ->foo4 : typeof foo4 +>foo4 : { (x: C): number; (x: D): string; } >x : D >D : D function foo4(x: any): any { } ->foo4 : typeof foo4 +>foo4 : { (x: C): number; (x: D): string; } >x : any var r = foo4(new C()); >r : number >foo4(new C()) : number ->foo4 : typeof foo4 +>foo4 : { (x: C): number; (x: D): string; } >new C() : C >C : typeof C var r = foo4(new D()); >r : number >foo4(new D()) : number ->foo4 : typeof foo4 +>foo4 : { (x: C): number; (x: D): string; } >new D() : D >D : typeof D function foo5(x: C): number; ->foo5 : typeof foo5 +>foo5 : { (x: C): number; (x: C): string; } >x : C >C : C function foo5(x: C): string; // error ->foo5 : typeof foo5 +>foo5 : { (x: C): number; (x: C): string; } >x : C >C : C function foo5(x: any): any { } ->foo5 : typeof foo5 +>foo5 : { (x: C): number; (x: C): string; } >x : any function foo6(x: D): number; ->foo6 : typeof foo6 +>foo6 : { (x: D): number; (x: D): string; } >x : D >D : D function foo6(x: D): string; // error ->foo6 : typeof foo6 +>foo6 : { (x: D): number; (x: D): string; } >x : D >D : D function foo6(x: any): any { } ->foo6 : typeof foo6 +>foo6 : { (x: D): number; (x: D): string; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithPublics.types b/tests/baselines/reference/objectTypesIdentityWithPublics.types index a15bc396bea..411fe4fb88e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPublics.types +++ b/tests/baselines/reference/objectTypesIdentityWithPublics.types @@ -41,240 +41,240 @@ var b = { foo: '' }; >foo : string function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { foo: string; }): any; (x: { foo: string; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // error ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // error ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // error ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo: string; }): any; } >x : A >A : A function foo7(x: typeof a); // error ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { foo: string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo: string; }): any; } >x : B >B : B function foo10(x: typeof a); // error ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { foo: string; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: string; }): any; } >x : B >B : B function foo11(x: typeof b); // error ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { foo: string; }): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo: string; }): any; } >x : I >I : I function foo13(x: typeof a); // error ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo: string; }): any; } >x : { foo: string; } >a : { foo: string; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { foo: string; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: string; }): any; } >x : I >I : I function foo14(x: typeof b); // error ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: string; }): any; } >x : { foo: string; } >b : { foo: string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { foo: string; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.types b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.types index 9488d61a819..83a73646874 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.types +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.types @@ -54,325 +54,325 @@ var b: { [x: string]: string; } = { foo: '' }; >foo : string function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { [x: string]: string; }): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >a : { [x: string]: string; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { [x: string]: string; }): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >a : { [x: string]: string; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { [x: string]: string; }): any; (x: { [x: string]: string; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { [x: string]: string; }): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >b : { [x: string]: string; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { [x: string]: string; }): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >b : { [x: string]: string; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { [x: string]: string; }): any; (x: { [x: string]: string; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // error ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // error ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo5c(x: A); ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : A >A : A function foo5c(x: PA); // error ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : PA >PA : PA function foo5c(x: any) { } ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : any function foo5d(x: A); ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : A >A : A function foo5d(x: PB); // error ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : PB >PB : PB function foo5d(x: any) { } ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // error ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: string]: string; }): any; } >x : A >A : A function foo7(x: typeof a); // error ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >a : { [x: string]: string; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: string]: string; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // error ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: string]: string; }): any; } >x : B >B : B function foo10(x: typeof a); // error ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >a : { [x: string]: string; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: string]: string; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: string]: string; }): any; } >x : B >B : B function foo11(x: typeof b); // error ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >b : { [x: string]: string; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: string]: string; }): any; } >x : any function foo11b(x: B); ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : B >B : B function foo11b(x: PA); // error ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : PA >PA : PA function foo11b(x: any) { } ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : any function foo11c(x: B); ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : B >B : B function foo11c(x: PB); // error ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : PB >PB : PB function foo11c(x: any) { } ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: string]: string; }): any; } >x : I >I : I function foo13(x: typeof a); // error ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >a : { [x: string]: string; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: string]: string; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: string]: string; }): any; } >x : I >I : I function foo14(x: typeof b); // error ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: string]: string; }): any; } >x : { [x: string]: string; } >b : { [x: string]: string; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: string]: string; }): any; } >x : any function foo15(x: I); ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : I >I : I function foo15(x: PA); // error ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : PA >PA : PA function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : any function foo16(x: I); ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : I >I : I function foo16(x: PB); // error ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : PB >PB : PB function foo16(x: any) { } ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.types b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.types index 6a9d54b1062..c621be1e26b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.types +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.types @@ -70,328 +70,328 @@ var b: { [x: string]: Derived; } = { foo: null }; >Derived : Derived function foo1(x: A); ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: A); // error ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : A >A : A function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: A): any; (x: A): any; } >x : any function foo1b(x: B); ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: B); // error ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : B >B : B function foo1b(x: any) { } ->foo1b : typeof foo1b +>foo1b : { (x: B): any; (x: B): any; } >x : any function foo1c(x: C); ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: C); // error ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : C >C : C function foo1c(x: any) { } ->foo1c : typeof foo1c +>foo1c : { (x: C): any; (x: C): any; } >x : any function foo2(x: I); ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: I); // error ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : I >I : I function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: I): any; (x: I): any; } >x : any function foo3(x: typeof a); ->foo3 : typeof foo3 +>foo3 : { (x: { [x: string]: Base; }): any; (x: { [x: string]: Base; }): any; } >x : { [x: string]: Base; } >a : { [x: string]: Base; } function foo3(x: typeof a); // error ->foo3 : typeof foo3 +>foo3 : { (x: { [x: string]: Base; }): any; (x: { [x: string]: Base; }): any; } >x : { [x: string]: Base; } >a : { [x: string]: Base; } function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: { [x: string]: Base; }): any; (x: { [x: string]: Base; }): any; } >x : any function foo4(x: typeof b); ->foo4 : typeof foo4 +>foo4 : { (x: { [x: string]: Derived; }): any; (x: { [x: string]: Derived; }): any; } >x : { [x: string]: Derived; } >b : { [x: string]: Derived; } function foo4(x: typeof b); // error ->foo4 : typeof foo4 +>foo4 : { (x: { [x: string]: Derived; }): any; (x: { [x: string]: Derived; }): any; } >x : { [x: string]: Derived; } >b : { [x: string]: Derived; } function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: { [x: string]: Derived; }): any; (x: { [x: string]: Derived; }): any; } >x : any function foo5(x: A); ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : A >A : A function foo5(x: B); // ok ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : B >B : B function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: A): any; (x: B): any; } >x : any function foo5b(x: A); ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : A >A : A function foo5b(x: C); // ok ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : C >C : C >Derived : Derived function foo5b(x: any) { } ->foo5b : typeof foo5b +>foo5b : { (x: A): any; (x: C): any; } >x : any function foo5c(x: A); ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : A >A : A function foo5c(x: PA); // error ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : PA >PA : PA function foo5c(x: any) { } ->foo5c : typeof foo5c +>foo5c : { (x: A): any; (x: PA): any; } >x : any function foo5d(x: A); ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : A >A : A function foo5d(x: PB); // ok ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : PB >PB : PB function foo5d(x: any) { } ->foo5d : typeof foo5d +>foo5d : { (x: A): any; (x: PB): any; } >x : any function foo6(x: A); ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : A >A : A function foo6(x: I); // ok ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : I >I : I function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: A): any; (x: I): any; } >x : any function foo7(x: A); ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: string]: Base; }): any; } >x : A >A : A function foo7(x: typeof a); // error ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: string]: Base; }): any; } >x : { [x: string]: Base; } >a : { [x: string]: Base; } function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: A): any; (x: { [x: string]: Base; }): any; } >x : any function foo8(x: B); ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : B >B : B function foo8(x: I); // error ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : I >I : I function foo8(x: any) { } ->foo8 : typeof foo8 +>foo8 : { (x: B): any; (x: I): any; } >x : any function foo9(x: B); ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : B >B : B function foo9(x: C); // ok ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : C >C : C >Base : Base function foo9(x: any) { } ->foo9 : typeof foo9 +>foo9 : { (x: B): any; (x: C): any; } >x : any function foo10(x: B); ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: string]: Base; }): any; } >x : B >B : B function foo10(x: typeof a); // ok ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: string]: Base; }): any; } >x : { [x: string]: Base; } >a : { [x: string]: Base; } function foo10(x: any) { } ->foo10 : typeof foo10 +>foo10 : { (x: B): any; (x: { [x: string]: Base; }): any; } >x : any function foo11(x: B); ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: string]: Derived; }): any; } >x : B >B : B function foo11(x: typeof b); // error ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: string]: Derived; }): any; } >x : { [x: string]: Derived; } >b : { [x: string]: Derived; } function foo11(x: any) { } ->foo11 : typeof foo11 +>foo11 : { (x: B): any; (x: { [x: string]: Derived; }): any; } >x : any function foo11b(x: B); ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : B >B : B function foo11b(x: PA); // ok ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : PA >PA : PA function foo11b(x: any) { } ->foo11b : typeof foo11b +>foo11b : { (x: B): any; (x: PA): any; } >x : any function foo11c(x: B); ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : B >B : B function foo11c(x: PB); // error ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : PB >PB : PB function foo11c(x: any) { } ->foo11c : typeof foo11c +>foo11c : { (x: B): any; (x: PB): any; } >x : any function foo12(x: I); ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : I >I : I function foo12(x: C); // error ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : C >C : C >Derived : Derived function foo12(x: any) { } ->foo12 : typeof foo12 +>foo12 : { (x: I): any; (x: C): any; } >x : any function foo13(x: I); ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: string]: Base; }): any; } >x : I >I : I function foo13(x: typeof a); // ok ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: string]: Base; }): any; } >x : { [x: string]: Base; } >a : { [x: string]: Base; } function foo13(x: any) { } ->foo13 : typeof foo13 +>foo13 : { (x: I): any; (x: { [x: string]: Base; }): any; } >x : any function foo14(x: I); ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: string]: Derived; }): any; } >x : I >I : I function foo14(x: typeof b); // error ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: string]: Derived; }): any; } >x : { [x: string]: Derived; } >b : { [x: string]: Derived; } function foo14(x: any) { } ->foo14 : typeof foo14 +>foo14 : { (x: I): any; (x: { [x: string]: Derived; }): any; } >x : any function foo15(x: I); ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : I >I : I function foo15(x: PA); // ok ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : PA >PA : PA function foo15(x: any) { } ->foo15 : typeof foo15 +>foo15 : { (x: I): any; (x: PA): any; } >x : any function foo16(x: I); ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : I >I : I function foo16(x: PB); // error ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : PB >PB : PB function foo16(x: any) { } ->foo16 : typeof foo16 +>foo16 : { (x: I): any; (x: PB): any; } >x : any diff --git a/tests/baselines/reference/optionalAccessorsInInterface1.types b/tests/baselines/reference/optionalAccessorsInInterface1.types index ab541bd0400..c426cdba178 100644 --- a/tests/baselines/reference/optionalAccessorsInInterface1.types +++ b/tests/baselines/reference/optionalAccessorsInInterface1.types @@ -11,7 +11,7 @@ interface MyPropertyDescriptor { } declare function defineMyProperty(o: any, p: string, attributes: MyPropertyDescriptor): any; ->defineMyProperty : typeof defineMyProperty +>defineMyProperty : (o: any, p: string, attributes: MyPropertyDescriptor) => any >o : any >p : string >attributes : MyPropertyDescriptor @@ -19,7 +19,7 @@ declare function defineMyProperty(o: any, p: string, attributes: MyPropertyDescr defineMyProperty({}, "name", { get: function () { return 5; } }); >defineMyProperty({}, "name", { get: function () { return 5; } }) : any ->defineMyProperty : typeof defineMyProperty +>defineMyProperty : (o: any, p: string, attributes: MyPropertyDescriptor) => any >{} : {} >{ get: function () { return 5; } } : { get: () => number; } >get : () => number @@ -37,7 +37,7 @@ interface MyPropertyDescriptor2 { } declare function defineMyProperty2(o: any, p: string, attributes: MyPropertyDescriptor2): any; ->defineMyProperty2 : typeof defineMyProperty2 +>defineMyProperty2 : (o: any, p: string, attributes: MyPropertyDescriptor2) => any >o : any >p : string >attributes : MyPropertyDescriptor2 @@ -45,7 +45,7 @@ declare function defineMyProperty2(o: any, p: string, attributes: MyPropertyDesc defineMyProperty2({}, "name", { get: function () { return 5; } }); >defineMyProperty2({}, "name", { get: function () { return 5; } }) : any ->defineMyProperty2 : typeof defineMyProperty2 +>defineMyProperty2 : (o: any, p: string, attributes: MyPropertyDescriptor2) => any >{} : {} >{ get: function () { return 5; } } : { get: () => number; } >get : () => number diff --git a/tests/baselines/reference/optionalParamReferencingOtherParams1.types b/tests/baselines/reference/optionalParamReferencingOtherParams1.types index 8170b3e95f1..3a62d51759c 100644 --- a/tests/baselines/reference/optionalParamReferencingOtherParams1.types +++ b/tests/baselines/reference/optionalParamReferencingOtherParams1.types @@ -1,6 +1,6 @@ === tests/cases/compiler/optionalParamReferencingOtherParams1.ts === function strange(x: number, y = x * 1, z = x + y) { ->strange : typeof strange +>strange : (x: number, y?: number, z?: number) => number >x : number >y : number >x * 1 : number diff --git a/tests/baselines/reference/overload2.types b/tests/baselines/reference/overload2.types index b52ff0579ca..05a9533b2d2 100644 --- a/tests/baselines/reference/overload2.types +++ b/tests/baselines/reference/overload2.types @@ -6,18 +6,18 @@ enum B { } >B : B function foo(a: A); ->foo : typeof foo +>foo : { (a: A): any; (b: B): any; } >a : A >A : A function foo(b: B); ->foo : typeof foo +>foo : { (a: A): any; (b: B): any; } >b : B >B : B // should be ok function foo(x: number) { ->foo : typeof foo +>foo : { (a: A): any; (b: B): any; } >x : number } @@ -25,18 +25,18 @@ class C { } >C : C function foo1(a: A); ->foo1 : typeof foo1 +>foo1 : { (a: A): any; (c: C): any; } >a : A >A : A function foo1(c: C); ->foo1 : typeof foo1 +>foo1 : { (a: A): any; (c: C): any; } >c : C >C : C // should be ok function foo1(x: number) { ->foo1 : typeof foo1 +>foo1 : { (a: A): any; (c: C): any; } >x : number } diff --git a/tests/baselines/reference/overloadCrash.types b/tests/baselines/reference/overloadCrash.types index 3a93fcb6d53..88c2b8c79c0 100644 --- a/tests/baselines/reference/overloadCrash.types +++ b/tests/baselines/reference/overloadCrash.types @@ -17,12 +17,12 @@ interface I3 {a:number; b:number; c:number; d:number;}; >d : number declare function foo(...n:I1[]); ->foo : typeof foo +>foo : { (...n: I1[]): any; (n1: I2, n3: I2): any; } >n : I1[] >I1 : I1 declare function foo(n1:I2, n3:I2); ->foo : typeof foo +>foo : { (...n: I1[]): any; (n1: I2, n3: I2): any; } >n1 : I2 >I2 : I2 >n3 : I2 @@ -34,7 +34,7 @@ var i3:I3; foo(i3, i3); // should not crash the compiler :) >foo(i3, i3) : any ->foo : typeof foo +>foo : { (...n: I1[]): any; (n1: I2, n3: I2): any; } >i3 : I3 >i3 : I3 diff --git a/tests/baselines/reference/overloadGenericFunctionWithRestArgs.types b/tests/baselines/reference/overloadGenericFunctionWithRestArgs.types index 5ea89a59e9b..17ecdeac503 100644 --- a/tests/baselines/reference/overloadGenericFunctionWithRestArgs.types +++ b/tests/baselines/reference/overloadGenericFunctionWithRestArgs.types @@ -17,7 +17,7 @@ class A{ >U : U } function Choice(...v_args: T[]): A; ->Choice : typeof Choice +>Choice : (...v_args: T[]) => A >T : T >v_args : T[] >T : T @@ -25,7 +25,7 @@ function Choice(...v_args: T[]): A; >T : T function Choice(...v_args: T[]): A { ->Choice : typeof Choice +>Choice : (...v_args: T[]) => A >T : T >v_args : T[] >T : T diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.types b/tests/baselines/reference/overloadOnConstConstraintChecks2.types index d4a62b4e9a7..c5af206c6da 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.types @@ -14,22 +14,22 @@ class C extends A { >foo : () => void } function foo(name: 'hi'): B; ->foo : typeof foo +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } >name : 'hi' >B : B function foo(name: 'bye'): C; ->foo : typeof foo +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } >name : 'bye' >C : C function foo(name: string): A; ->foo : typeof foo +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } >name : string >A : A function foo(name: any): A { ->foo : typeof foo +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } >name : any >A : A diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.types b/tests/baselines/reference/overloadOnConstConstraintChecks3.types index e3c2ead8606..adc41ff235c 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.types +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.types @@ -15,22 +15,22 @@ class C extends A { >foo : () => void } function foo(name: 'hi'): B; ->foo : typeof foo +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } >name : 'hi' >B : B function foo(name: 'bye'): C; ->foo : typeof foo +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } >name : 'bye' >C : C function foo(name: string): A; ->foo : typeof foo +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } >name : string >A : A function foo(name: any): A { ->foo : typeof foo +>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; } >name : any >A : A diff --git a/tests/baselines/reference/overloadOnGenericClassAndNonGenericClass.types b/tests/baselines/reference/overloadOnGenericClassAndNonGenericClass.types index c69b06e5c1c..c0d0533a533 100644 --- a/tests/baselines/reference/overloadOnGenericClassAndNonGenericClass.types +++ b/tests/baselines/reference/overloadOnGenericClassAndNonGenericClass.types @@ -26,13 +26,13 @@ class X2 { x: string; } >x : string function f(a: X1): A; ->f : typeof f +>f : { (a: X1): A; (a: X): B; } >a : X1 >X1 : X1 >A : A function f(a: X): B; ->f : typeof f +>f : { (a: X1): A; (a: X): B; } >T : T >a : X >X : X @@ -40,7 +40,7 @@ function f(a: X): B; >B : B function f(a): any { ->f : typeof f +>f : { (a: X1): A; (a: X): B; } >a : any } @@ -51,7 +51,7 @@ var xs: X; var t3 = f(xs); >t3 : A >f(xs) : A ->f : typeof f +>f : { (a: X1): A; (a: X): B; } >xs : X var t3: A; // should not error diff --git a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types index 1936ac54b53..6e129400736 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types +++ b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types @@ -8,7 +8,7 @@ module Bugs { // replace(searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; function bug2(message:string, ...args:any[]):string { ->bug2 : typeof bug2 +>bug2 : (message: string, ...args: any[]) => string >message : string >args : any[] @@ -50,25 +50,25 @@ module Bugs { } function bug3(f:(x:string)=>string) { return f("s") } ->bug3 : typeof bug3 +>bug3 : (f: (x: string) => string) => string >f : (x: string) => string >x : string >f("s") : string >f : (x: string) => string function fprime(x:string):string { return x; } ->fprime : typeof fprime +>fprime : (x: string) => string >x : string >x : string bug3(fprime); >bug3(fprime) : string ->bug3 : typeof bug3 ->fprime : typeof fprime +>bug3 : (f: (x: string) => string) => string +>fprime : (x: string) => string bug3(function(x:string):string { return x; }); >bug3(function(x:string):string { return x; }) : string ->bug3 : typeof bug3 +>bug3 : (f: (x: string) => string) => string >function(x:string):string { return x; } : (x: string) => string >x : string >x : string diff --git a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.types b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.types index 0a13b0084c1..6bc491fd157 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.types +++ b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.types @@ -32,7 +32,7 @@ module Bugs { } function bug3() { ->bug3 : typeof bug3 +>bug3 : () => void var tokens:IToken[]= []; >tokens : IToken[] diff --git a/tests/baselines/reference/overloadReturnTypes.types b/tests/baselines/reference/overloadReturnTypes.types index 125bca016d4..1823c752ae7 100644 --- a/tests/baselines/reference/overloadReturnTypes.types +++ b/tests/baselines/reference/overloadReturnTypes.types @@ -3,22 +3,22 @@ class Accessor {} >Accessor : Accessor function attr(name: string): string; ->attr : typeof attr +>attr : { (name: string): string; (name: string, value: string): Accessor; (map: any): Accessor; } >name : string function attr(name: string, value: string): Accessor; ->attr : typeof attr +>attr : { (name: string): string; (name: string, value: string): Accessor; (map: any): Accessor; } >name : string >value : string >Accessor : Accessor function attr(map: any): Accessor; ->attr : typeof attr +>attr : { (name: string): string; (name: string, value: string): Accessor; (map: any): Accessor; } >map : any >Accessor : Accessor function attr(nameOrMap: any, value?: string): any { ->attr : typeof attr +>attr : { (name: string): string; (name: string, value: string): Accessor; (map: any): Accessor; } >nameOrMap : any >value : string diff --git a/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.types b/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.types index dec652bc677..2ed804ad012 100644 --- a/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.types +++ b/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.types @@ -1,27 +1,27 @@ === tests/cases/compiler/overloadWithCallbacksWithDifferingOptionalityOnArgs.ts === function x2(callback: (x?: number) => number); ->x2 : typeof x2 +>x2 : { (callback: (x?: number) => number): any; (callback: (x: string) => number): any; } >callback : (x?: number) => number >x : number function x2(callback: (x: string) => number); ->x2 : typeof x2 +>x2 : { (callback: (x?: number) => number): any; (callback: (x: string) => number): any; } >callback : (x: string) => number >x : string function x2(callback: (x: any) => number) { } ->x2 : typeof x2 +>x2 : { (callback: (x?: number) => number): any; (callback: (x: string) => number): any; } >callback : (x: any) => number >x : any x2(() => 1); >x2(() => 1) : any ->x2 : typeof x2 +>x2 : { (callback: (x?: number) => number): any; (callback: (x: string) => number): any; } >() => 1 : () => number x2((x) => 1 ); >x2((x) => 1 ) : any ->x2 : typeof x2 +>x2 : { (callback: (x?: number) => number): any; (callback: (x: string) => number): any; } >(x) => 1 : (x: number) => number >x : number diff --git a/tests/baselines/reference/overloadsAndTypeArgumentArity.types b/tests/baselines/reference/overloadsAndTypeArgumentArity.types index b7ac883b837..1b76b8e13fe 100644 --- a/tests/baselines/reference/overloadsAndTypeArgumentArity.types +++ b/tests/baselines/reference/overloadsAndTypeArgumentArity.types @@ -1,21 +1,21 @@ === tests/cases/compiler/overloadsAndTypeArgumentArity.ts === declare function Callbacks(flags?: string): void; ->Callbacks : typeof Callbacks +>Callbacks : { (flags?: string): void; (flags?: string): void; (flags?: string): void; (flags?: string): void; } >flags : string declare function Callbacks(flags?: string): void; ->Callbacks : typeof Callbacks +>Callbacks : { (flags?: string): void; (flags?: string): void; (flags?: string): void; (flags?: string): void; } >T : T >flags : string declare function Callbacks(flags?: string): void; ->Callbacks : typeof Callbacks +>Callbacks : { (flags?: string): void; (flags?: string): void; (flags?: string): void; (flags?: string): void; } >T1 : T1 >T2 : T2 >flags : string declare function Callbacks(flags?: string): void; ->Callbacks : typeof Callbacks +>Callbacks : { (flags?: string): void; (flags?: string): void; (flags?: string): void; (flags?: string): void; } >T1 : T1 >T2 : T2 >T3 : T3 @@ -23,9 +23,9 @@ declare function Callbacks(flags?: string): void; Callbacks('s'); // no error >Callbacks('s') : void ->Callbacks : typeof Callbacks +>Callbacks : { (flags?: string): void; (flags?: string): void; (flags?: string): void; (flags?: string): void; } new Callbacks('s'); // no error >new Callbacks('s') : any ->Callbacks : typeof Callbacks +>Callbacks : { (flags?: string): void; (flags?: string): void; (flags?: string): void; (flags?: string): void; } diff --git a/tests/baselines/reference/parametersWithNoAnnotationAreAny.types b/tests/baselines/reference/parametersWithNoAnnotationAreAny.types index 791ab04550e..9629d06c114 100644 --- a/tests/baselines/reference/parametersWithNoAnnotationAreAny.types +++ b/tests/baselines/reference/parametersWithNoAnnotationAreAny.types @@ -1,6 +1,6 @@ === tests/cases/conformance/types/objectTypeLiteral/callSignatures/parametersWithNoAnnotationAreAny.ts === function foo(x) { return x; } ->foo : typeof foo +>foo : (x: any) => any >x : any >x : any diff --git a/tests/baselines/reference/parserFunctionDeclaration1.d.types b/tests/baselines/reference/parserFunctionDeclaration1.d.types index 732188e3e8b..cb62ab01c90 100644 --- a/tests/baselines/reference/parserFunctionDeclaration1.d.types +++ b/tests/baselines/reference/parserFunctionDeclaration1.d.types @@ -1,4 +1,4 @@ === tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration1.d.ts === declare function F(); ->F : typeof F +>F : () => any diff --git a/tests/baselines/reference/parserFunctionDeclaration5.types b/tests/baselines/reference/parserFunctionDeclaration5.types index 2d48c8f5d1a..a3cf71336ea 100644 --- a/tests/baselines/reference/parserFunctionDeclaration5.types +++ b/tests/baselines/reference/parserFunctionDeclaration5.types @@ -1,7 +1,7 @@ === tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration5.ts === function foo(); ->foo : typeof foo +>foo : () => any function foo() { } ->foo : typeof foo +>foo : () => any diff --git a/tests/baselines/reference/parserFunctionDeclaration8.types b/tests/baselines/reference/parserFunctionDeclaration8.types index 15a8721932d..ebb8ff8d409 100644 --- a/tests/baselines/reference/parserFunctionDeclaration8.types +++ b/tests/baselines/reference/parserFunctionDeclaration8.types @@ -3,5 +3,5 @@ declare module M { >M : typeof M function foo(); ->foo : typeof foo +>foo : () => any } diff --git a/tests/baselines/reference/parserModuleDeclaration11.types b/tests/baselines/reference/parserModuleDeclaration11.types index 2bb5171e96a..bd66d638ddf 100644 --- a/tests/baselines/reference/parserModuleDeclaration11.types +++ b/tests/baselines/reference/parserModuleDeclaration11.types @@ -6,14 +6,14 @@ declare module string { >X : X export function foo(s: string); ->foo : typeof foo +>foo : (s: string) => any >s : string } string.foo("abc"); >string.foo("abc") : any ->string.foo : typeof string.foo +>string.foo : (s: string) => any >string : typeof string ->foo : typeof string.foo +>foo : (s: string) => any var x: string.X; >x : string.X diff --git a/tests/baselines/reference/parserReturnStatement3.types b/tests/baselines/reference/parserReturnStatement3.types index 28b06c922ab..6484050efee 100644 --- a/tests/baselines/reference/parserReturnStatement3.types +++ b/tests/baselines/reference/parserReturnStatement3.types @@ -1,6 +1,6 @@ === tests/cases/conformance/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement3.ts === function f() { ->f : typeof f +>f : () => void return; } diff --git a/tests/baselines/reference/parserUnicodeWhitespaceCharacter1.types b/tests/baselines/reference/parserUnicodeWhitespaceCharacter1.types index fed538e327e..4fd487230b2 100644 --- a/tests/baselines/reference/parserUnicodeWhitespaceCharacter1.types +++ b/tests/baselines/reference/parserUnicodeWhitespaceCharacter1.types @@ -1,4 +1,4 @@ === tests/cases/conformance/parser/ecmascript5/parserUnicodeWhitespaceCharacter1.ts === function foo(){ } ->foo : typeof foo +>foo : () => void diff --git a/tests/baselines/reference/partiallyAmbientClodule.types b/tests/baselines/reference/partiallyAmbientClodule.types index c0cd877d05f..40307f426d0 100644 --- a/tests/baselines/reference/partiallyAmbientClodule.types +++ b/tests/baselines/reference/partiallyAmbientClodule.types @@ -3,7 +3,7 @@ declare module foo { >foo : typeof foo export function x(): any; ->x : typeof x +>x : () => any } class foo { } // Legal, because module is ambient >foo : foo diff --git a/tests/baselines/reference/partiallyAmbientFundule.types b/tests/baselines/reference/partiallyAmbientFundule.types index 37f59588a7c..c11c6ed5ec3 100644 --- a/tests/baselines/reference/partiallyAmbientFundule.types +++ b/tests/baselines/reference/partiallyAmbientFundule.types @@ -3,7 +3,7 @@ declare module foo { >foo : typeof foo export function x(): any; ->x : typeof x +>x : () => any } function foo () { } // Legal, because module is ambient >foo : typeof foo diff --git a/tests/baselines/reference/plusOperatorWithBooleanType.types b/tests/baselines/reference/plusOperatorWithBooleanType.types index 79d10141cb8..40ca167a4d7 100644 --- a/tests/baselines/reference/plusOperatorWithBooleanType.types +++ b/tests/baselines/reference/plusOperatorWithBooleanType.types @@ -4,7 +4,7 @@ var BOOLEAN: boolean; >BOOLEAN : boolean function foo(): boolean { return true; } ->foo : typeof foo +>foo : () => boolean class A { >A : A @@ -64,7 +64,7 @@ var ResultIsNumber6 = +foo(); >ResultIsNumber6 : number >+foo() : number >foo() : boolean ->foo : typeof foo +>foo : () => boolean var ResultIsNumber7 = +A.foo(); >ResultIsNumber7 : number @@ -85,7 +85,7 @@ var ResultIsNumber7 = +A.foo(); +foo(); >+foo() : number >foo() : boolean ->foo : typeof foo +>foo : () => boolean +true, false; >+true, false : boolean diff --git a/tests/baselines/reference/plusOperatorWithNumberType.types b/tests/baselines/reference/plusOperatorWithNumberType.types index 7c605ca37d0..cad0448f2a3 100644 --- a/tests/baselines/reference/plusOperatorWithNumberType.types +++ b/tests/baselines/reference/plusOperatorWithNumberType.types @@ -8,7 +8,7 @@ var NUMBER1: number[] = [1, 2]; >[1, 2] : number[] function foo(): number { return 1; } ->foo : typeof foo +>foo : () => number class A { >A : A @@ -89,7 +89,7 @@ var ResultIsNumber9 = +foo(); >ResultIsNumber9 : number >+foo() : number >foo() : number ->foo : typeof foo +>foo : () => number var ResultIsNumber10 = +A.foo(); >ResultIsNumber10 : number @@ -122,7 +122,7 @@ var ResultIsNumber11 = +(NUMBER + NUMBER); +foo(); >+foo() : number >foo() : number ->foo : typeof foo +>foo : () => number +objA.a; >+objA.a : number diff --git a/tests/baselines/reference/plusOperatorWithStringType.types b/tests/baselines/reference/plusOperatorWithStringType.types index e8915a8b60a..d08a3917196 100644 --- a/tests/baselines/reference/plusOperatorWithStringType.types +++ b/tests/baselines/reference/plusOperatorWithStringType.types @@ -8,7 +8,7 @@ var STRING1: string[] = ["", "abc"]; >["", "abc"] : string[] function foo(): string { return "abc"; } ->foo : typeof foo +>foo : () => string class A { >A : A @@ -89,7 +89,7 @@ var ResultIsNumber9 = +foo(); >ResultIsNumber9 : number >+foo() : number >foo() : string ->foo : typeof foo +>foo : () => string var ResultIsNumber10 = +A.foo(); >ResultIsNumber10 : number @@ -130,7 +130,7 @@ var ResultIsNumber12 = +STRING.charAt(0); +foo(); >+foo() : number >foo() : string ->foo : typeof foo +>foo : () => string +objA.a,M.n; >+objA.a,M.n : string diff --git a/tests/baselines/reference/primtiveTypesAreIdentical.types b/tests/baselines/reference/primtiveTypesAreIdentical.types index aee6272223f..bbff4623f0b 100644 --- a/tests/baselines/reference/primtiveTypesAreIdentical.types +++ b/tests/baselines/reference/primtiveTypesAreIdentical.types @@ -2,67 +2,67 @@ // primitive types are identical to themselves so these overloads will all cause errors function foo1(x: number); ->foo1 : typeof foo1 +>foo1 : { (x: number): any; (x: number): any; } >x : number function foo1(x: number); ->foo1 : typeof foo1 +>foo1 : { (x: number): any; (x: number): any; } >x : number function foo1(x: any) { } ->foo1 : typeof foo1 +>foo1 : { (x: number): any; (x: number): any; } >x : any function foo2(x: string); ->foo2 : typeof foo2 +>foo2 : { (x: string): any; (x: string): any; } >x : string function foo2(x: string); ->foo2 : typeof foo2 +>foo2 : { (x: string): any; (x: string): any; } >x : string function foo2(x: any) { } ->foo2 : typeof foo2 +>foo2 : { (x: string): any; (x: string): any; } >x : any function foo3(x: boolean); ->foo3 : typeof foo3 +>foo3 : { (x: boolean): any; (x: boolean): any; } >x : boolean function foo3(x: boolean); ->foo3 : typeof foo3 +>foo3 : { (x: boolean): any; (x: boolean): any; } >x : boolean function foo3(x: any) { } ->foo3 : typeof foo3 +>foo3 : { (x: boolean): any; (x: boolean): any; } >x : any function foo4(x: any); ->foo4 : typeof foo4 +>foo4 : { (x: any): any; (x: any): any; } >x : any function foo4(x: any); ->foo4 : typeof foo4 +>foo4 : { (x: any): any; (x: any): any; } >x : any function foo4(x: any) { } ->foo4 : typeof foo4 +>foo4 : { (x: any): any; (x: any): any; } >x : any function foo5(x: 'a'); ->foo5 : typeof foo5 +>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } >x : 'a' function foo5(x: 'a'); ->foo5 : typeof foo5 +>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } >x : 'a' function foo5(x: string); ->foo5 : typeof foo5 +>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } >x : string function foo5(x: any) { } ->foo5 : typeof foo5 +>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; } >x : any enum E { A } @@ -70,28 +70,28 @@ enum E { A } >A : E function foo6(x: E); ->foo6 : typeof foo6 +>foo6 : { (x: E): any; (x: E): any; } >x : E >E : E function foo6(x: E); ->foo6 : typeof foo6 +>foo6 : { (x: E): any; (x: E): any; } >x : E >E : E function foo6(x: any) { } ->foo6 : typeof foo6 +>foo6 : { (x: E): any; (x: E): any; } >x : any function foo7(x: void); ->foo7 : typeof foo7 +>foo7 : { (x: void): any; (x: void): any; } >x : void function foo7(x: void); ->foo7 : typeof foo7 +>foo7 : { (x: void): any; (x: void): any; } >x : void function foo7(x: any) { } ->foo7 : typeof foo7 +>foo7 : { (x: void): any; (x: void): any; } >x : any diff --git a/tests/baselines/reference/privacyCheckAnonymousFunctionParameter.types b/tests/baselines/reference/privacyCheckAnonymousFunctionParameter.types index 2ce71bdacfa..17e496f5568 100644 --- a/tests/baselines/reference/privacyCheckAnonymousFunctionParameter.types +++ b/tests/baselines/reference/privacyCheckAnonymousFunctionParameter.types @@ -11,7 +11,7 @@ module Query { >Query : typeof Query export function fromDoWhile(doWhile: (test: Iterator) => boolean): Iterator { ->fromDoWhile : typeof fromDoWhile +>fromDoWhile : (doWhile: (test: Iterator) => boolean) => Iterator >T : T >doWhile : (test: Iterator) => boolean >test : Iterator @@ -24,11 +24,11 @@ module Query { } function fromOrderBy() { ->fromOrderBy : typeof fromOrderBy +>fromOrderBy : () => Iterator<{}> return fromDoWhile(test => { >fromDoWhile(test => { return true; }) : Iterator<{}> ->fromDoWhile : typeof fromDoWhile +>fromDoWhile : (doWhile: (test: Iterator) => boolean) => Iterator >test => { return true; } : (test: Iterator<{}>) => boolean >test : Iterator<{}> diff --git a/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.types b/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.types index 7854f5f9b77..6615a3c9af0 100644 --- a/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.types +++ b/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.types @@ -12,7 +12,7 @@ module Q { >Q : typeof Q export function foo(x: (a: Iterator) => number) { ->foo : typeof foo +>foo : (x: (a: Iterator) => number) => (a: Iterator) => number >T : T >x : (a: Iterator) => number >a : Iterator @@ -28,10 +28,10 @@ module Q { >Q : typeof Q function bar() { ->bar : typeof bar +>bar : () => void foo(null); >foo(null) : (a: Iterator<{}>) => number ->foo : typeof foo +>foo : (x: (a: Iterator) => number) => (a: Iterator) => number } } diff --git a/tests/baselines/reference/privacyFunc.types b/tests/baselines/reference/privacyFunc.types index 367a5213a3a..e43a5c0102a 100644 --- a/tests/baselines/reference/privacyFunc.types +++ b/tests/baselines/reference/privacyFunc.types @@ -267,32 +267,32 @@ module m1 { } function f1_public(m1_f1_arg: C1_public) { ->f1_public : typeof f1_public +>f1_public : (m1_f1_arg: C1_public) => void >m1_f1_arg : C1_public >C1_public : C1_public } export function f2_public(m1_f2_arg: C1_public) { ->f2_public : typeof f2_public +>f2_public : (m1_f2_arg: C1_public) => void >m1_f2_arg : C1_public >C1_public : C1_public } function f3_public(m1_f3_arg: C2_private) { ->f3_public : typeof f3_public +>f3_public : (m1_f3_arg: C2_private) => void >m1_f3_arg : C2_private >C2_private : C2_private } export function f4_public(m1_f4_arg: C2_private) { // error ->f4_public : typeof f4_public +>f4_public : (m1_f4_arg: C2_private) => void >m1_f4_arg : C2_private >C2_private : C2_private } function f5_public() { ->f5_public : typeof f5_public +>f5_public : () => C1_public return new C1_public(); >new C1_public() : C1_public @@ -300,7 +300,7 @@ module m1 { } export function f6_public() { ->f6_public : typeof f6_public +>f6_public : () => C1_public return new C1_public(); >new C1_public() : C1_public @@ -308,7 +308,7 @@ module m1 { } function f7_public() { ->f7_public : typeof f7_public +>f7_public : () => C2_private return new C2_private(); >new C2_private() : C2_private @@ -316,7 +316,7 @@ module m1 { } export function f8_public() { ->f8_public : typeof f8_public +>f8_public : () => C2_private return new C2_private(); // error >new C2_private() : C2_private @@ -325,7 +325,7 @@ module m1 { function f9_private(): C1_public { ->f9_private : typeof f9_private +>f9_private : () => C1_public >C1_public : C1_public return new C1_public(); @@ -334,7 +334,7 @@ module m1 { } export function f10_public(): C1_public { ->f10_public : typeof f10_public +>f10_public : () => C1_public >C1_public : C1_public return new C1_public(); @@ -343,7 +343,7 @@ module m1 { } function f11_private(): C2_private { ->f11_private : typeof f11_private +>f11_private : () => C2_private >C2_private : C2_private return new C2_private(); @@ -352,7 +352,7 @@ module m1 { } export function f12_public(): C2_private { // error ->f12_public : typeof f12_public +>f12_public : () => C2_private >C2_private : C2_private return new C2_private(); //error @@ -433,7 +433,7 @@ class C9_public { function f4_public(f4_arg: C6_public) { ->f4_public : typeof f4_public +>f4_public : (f4_arg: C6_public) => void >f4_arg : C6_public >C6_public : C6_public } @@ -441,7 +441,7 @@ function f4_public(f4_arg: C6_public) { function f6_public() { ->f6_public : typeof f6_public +>f6_public : () => C6_public return new C6_public(); >new C6_public() : C6_public @@ -450,7 +450,7 @@ function f6_public() { function f10_public(): C6_public { ->f10_public : typeof f10_public +>f10_public : () => C6_public >C6_public : C6_public return new C6_public(); diff --git a/tests/baselines/reference/privacyGloFunc.types b/tests/baselines/reference/privacyGloFunc.types index 8b8eacd4157..35ccb19f8ed 100644 --- a/tests/baselines/reference/privacyGloFunc.types +++ b/tests/baselines/reference/privacyGloFunc.types @@ -267,32 +267,32 @@ export module m1 { } function f1_public(m1_f1_arg: C1_public) { ->f1_public : typeof f1_public +>f1_public : (m1_f1_arg: C1_public) => void >m1_f1_arg : C1_public >C1_public : C1_public } export function f2_public(m1_f2_arg: C1_public) { ->f2_public : typeof f2_public +>f2_public : (m1_f2_arg: C1_public) => void >m1_f2_arg : C1_public >C1_public : C1_public } function f3_public(m1_f3_arg: C2_private) { ->f3_public : typeof f3_public +>f3_public : (m1_f3_arg: C2_private) => void >m1_f3_arg : C2_private >C2_private : C2_private } export function f4_public(m1_f4_arg: C2_private) { // error ->f4_public : typeof f4_public +>f4_public : (m1_f4_arg: C2_private) => void >m1_f4_arg : C2_private >C2_private : C2_private } function f5_public() { ->f5_public : typeof f5_public +>f5_public : () => C1_public return new C1_public(); >new C1_public() : C1_public @@ -300,7 +300,7 @@ export module m1 { } export function f6_public() { ->f6_public : typeof f6_public +>f6_public : () => C1_public return new C1_public(); >new C1_public() : C1_public @@ -308,7 +308,7 @@ export module m1 { } function f7_public() { ->f7_public : typeof f7_public +>f7_public : () => C2_private return new C2_private(); >new C2_private() : C2_private @@ -316,7 +316,7 @@ export module m1 { } export function f8_public() { ->f8_public : typeof f8_public +>f8_public : () => C2_private return new C2_private(); // error >new C2_private() : C2_private @@ -325,7 +325,7 @@ export module m1 { function f9_private(): C1_public { ->f9_private : typeof f9_private +>f9_private : () => C1_public >C1_public : C1_public return new C1_public(); @@ -334,7 +334,7 @@ export module m1 { } export function f10_public(): C1_public { ->f10_public : typeof f10_public +>f10_public : () => C1_public >C1_public : C1_public return new C1_public(); @@ -343,7 +343,7 @@ export module m1 { } function f11_private(): C2_private { ->f11_private : typeof f11_private +>f11_private : () => C2_private >C2_private : C2_private return new C2_private(); @@ -352,7 +352,7 @@ export module m1 { } export function f12_public(): C2_private { // error ->f12_public : typeof f12_public +>f12_public : () => C2_private >C2_private : C2_private return new C2_private(); //error @@ -630,32 +630,32 @@ module m2 { } function f1_public(m2_f1_arg: m2_C1_public) { ->f1_public : typeof f1_public +>f1_public : (m2_f1_arg: m2_C1_public) => void >m2_f1_arg : m2_C1_public >m2_C1_public : m2_C1_public } export function f2_public(m2_f2_arg: m2_C1_public) { ->f2_public : typeof f2_public +>f2_public : (m2_f2_arg: m2_C1_public) => void >m2_f2_arg : m2_C1_public >m2_C1_public : m2_C1_public } function f3_public(m2_f3_arg: m2_C2_private) { ->f3_public : typeof f3_public +>f3_public : (m2_f3_arg: m2_C2_private) => void >m2_f3_arg : m2_C2_private >m2_C2_private : m2_C2_private } export function f4_public(m2_f4_arg: m2_C2_private) { ->f4_public : typeof f4_public +>f4_public : (m2_f4_arg: m2_C2_private) => void >m2_f4_arg : m2_C2_private >m2_C2_private : m2_C2_private } function f5_public() { ->f5_public : typeof f5_public +>f5_public : () => m2_C1_public return new m2_C1_public(); >new m2_C1_public() : m2_C1_public @@ -663,7 +663,7 @@ module m2 { } export function f6_public() { ->f6_public : typeof f6_public +>f6_public : () => m2_C1_public return new m2_C1_public(); >new m2_C1_public() : m2_C1_public @@ -671,7 +671,7 @@ module m2 { } function f7_public() { ->f7_public : typeof f7_public +>f7_public : () => m2_C2_private return new m2_C2_private(); >new m2_C2_private() : m2_C2_private @@ -679,7 +679,7 @@ module m2 { } export function f8_public() { ->f8_public : typeof f8_public +>f8_public : () => m2_C2_private return new m2_C2_private(); >new m2_C2_private() : m2_C2_private @@ -688,7 +688,7 @@ module m2 { function f9_private(): m2_C1_public { ->f9_private : typeof f9_private +>f9_private : () => m2_C1_public >m2_C1_public : m2_C1_public return new m2_C1_public(); @@ -697,7 +697,7 @@ module m2 { } export function f10_public(): m2_C1_public { ->f10_public : typeof f10_public +>f10_public : () => m2_C1_public >m2_C1_public : m2_C1_public return new m2_C1_public(); @@ -706,7 +706,7 @@ module m2 { } function f11_private(): m2_C2_private { ->f11_private : typeof f11_private +>f11_private : () => m2_C2_private >m2_C2_private : m2_C2_private return new m2_C2_private(); @@ -715,7 +715,7 @@ module m2 { } export function f12_public(): m2_C2_private { ->f12_public : typeof f12_public +>f12_public : () => m2_C2_private >m2_C2_private : m2_C2_private return new m2_C2_private(); @@ -988,31 +988,31 @@ class C12_private { } function f1_private(f1_arg: C5_private) { ->f1_private : typeof f1_private +>f1_private : (f1_arg: C5_private) => void >f1_arg : C5_private >C5_private : C5_private } export function f2_public(f2_arg: C5_private) { // error ->f2_public : typeof f2_public +>f2_public : (f2_arg: C5_private) => void >f2_arg : C5_private >C5_private : C5_private } function f3_private(f3_arg: C6_public) { ->f3_private : typeof f3_private +>f3_private : (f3_arg: C6_public) => void >f3_arg : C6_public >C6_public : C6_public } export function f4_public(f4_arg: C6_public) { ->f4_public : typeof f4_public +>f4_public : (f4_arg: C6_public) => void >f4_arg : C6_public >C6_public : C6_public } function f5_private() { ->f5_private : typeof f5_private +>f5_private : () => C6_public return new C6_public(); >new C6_public() : C6_public @@ -1020,7 +1020,7 @@ function f5_private() { } export function f6_public() { ->f6_public : typeof f6_public +>f6_public : () => C6_public return new C6_public(); >new C6_public() : C6_public @@ -1028,7 +1028,7 @@ export function f6_public() { } function f7_private() { ->f7_private : typeof f7_private +>f7_private : () => C5_private return new C5_private(); >new C5_private() : C5_private @@ -1036,7 +1036,7 @@ function f7_private() { } export function f8_public() { ->f8_public : typeof f8_public +>f8_public : () => C5_private return new C5_private(); //error >new C5_private() : C5_private @@ -1044,7 +1044,7 @@ export function f8_public() { } function f9_private(): C6_public { ->f9_private : typeof f9_private +>f9_private : () => C6_public >C6_public : C6_public return new C6_public(); @@ -1053,7 +1053,7 @@ function f9_private(): C6_public { } export function f10_public(): C6_public { ->f10_public : typeof f10_public +>f10_public : () => C6_public >C6_public : C6_public return new C6_public(); @@ -1062,7 +1062,7 @@ export function f10_public(): C6_public { } function f11_private(): C5_private { ->f11_private : typeof f11_private +>f11_private : () => C5_private >C5_private : C5_private return new C5_private(); @@ -1071,7 +1071,7 @@ function f11_private(): C5_private { } export function f12_public(): C5_private { //error ->f12_public : typeof f12_public +>f12_public : () => C5_private >C5_private : C5_private return new C5_private(); //error diff --git a/tests/baselines/reference/privacyTypeParameterOfFunction.types b/tests/baselines/reference/privacyTypeParameterOfFunction.types index 3a58521b0a1..7d5c147a21d 100644 --- a/tests/baselines/reference/privacyTypeParameterOfFunction.types +++ b/tests/baselines/reference/privacyTypeParameterOfFunction.types @@ -194,25 +194,25 @@ class privateClassWithWithPublicTypeParameters { // TypeParameter_0_of_exported_function_has_or_is_using_private_type_1 export function publicFunctionWithPrivateTypeParameters() { ->publicFunctionWithPrivateTypeParameters : typeof publicFunctionWithPrivateTypeParameters +>publicFunctionWithPrivateTypeParameters : () => void >T : T >privateClass : privateClass } export function publicFunctionWithPublicTypeParameters() { ->publicFunctionWithPublicTypeParameters : typeof publicFunctionWithPublicTypeParameters +>publicFunctionWithPublicTypeParameters : () => void >T : T >publicClass : publicClass } function privateFunctionWithPrivateTypeParameters() { ->privateFunctionWithPrivateTypeParameters : typeof privateFunctionWithPrivateTypeParameters +>privateFunctionWithPrivateTypeParameters : () => void >T : T >privateClass : privateClass } function privateFunctionWithPublicTypeParameters() { ->privateFunctionWithPublicTypeParameters : typeof privateFunctionWithPublicTypeParameters +>privateFunctionWithPublicTypeParameters : () => void >T : T >publicClass : publicClass } @@ -293,11 +293,11 @@ class privateClassWithWithPublicTypeParametersWithoutExtends { } export function publicFunctionWithPublicTypeParametersWithoutExtends() { ->publicFunctionWithPublicTypeParametersWithoutExtends : typeof publicFunctionWithPublicTypeParametersWithoutExtends +>publicFunctionWithPublicTypeParametersWithoutExtends : () => void >T : T } function privateFunctionWithPublicTypeParametersWithoutExtends() { ->privateFunctionWithPublicTypeParametersWithoutExtends : typeof privateFunctionWithPublicTypeParametersWithoutExtends +>privateFunctionWithPublicTypeParametersWithoutExtends : () => void >T : T } diff --git a/tests/baselines/reference/promiseTypeInference.types b/tests/baselines/reference/promiseTypeInference.types index 3674ea90dcf..52d026adb1d 100644 --- a/tests/baselines/reference/promiseTypeInference.types +++ b/tests/baselines/reference/promiseTypeInference.types @@ -30,12 +30,12 @@ interface IPromise { >U : U } declare function load(name: string): Promise; ->load : typeof load +>load : (name: string) => Promise >name : string >Promise : Promise declare function convert(s: string): IPromise; ->convert : typeof convert +>convert : (s: string) => IPromise >s : string >IPromise : IPromise @@ -44,11 +44,11 @@ var $$x = load("something").then(s => convert(s)); >load("something").then(s => convert(s)) : Promise >load("something").then : (success?: (value: string) => Promise) => Promise >load("something") : Promise ->load : typeof load +>load : (name: string) => Promise >then : (success?: (value: string) => Promise) => Promise >s => convert(s) : (s: string) => IPromise >s : string >convert(s) : IPromise ->convert : typeof convert +>convert : (s: string) => IPromise >s : string diff --git a/tests/baselines/reference/rectype.types b/tests/baselines/reference/rectype.types index 5d8da81c3e1..403e7a3a4dc 100644 --- a/tests/baselines/reference/rectype.types +++ b/tests/baselines/reference/rectype.types @@ -9,35 +9,35 @@ module M { >I : I export function f(p: I) { return f }; ->f : typeof f +>f : (p: I) => typeof f >p : I >I : I ->f : typeof f +>f : (p: I) => typeof f var i:I; >i : I >I : I f(i); ->f(i) : typeof f ->f : typeof f +>f(i) : (p: I) => typeof f +>f : (p: I) => typeof f >i : I f(f(i)); ->f(f(i)) : typeof f ->f : typeof f ->f(i) : typeof f ->f : typeof f +>f(f(i)) : (p: I) => typeof f +>f : (p: I) => typeof f +>f(i) : (p: I) => typeof f +>f : (p: I) => typeof f >i : I f((f(f(i)))); ->f((f(f(i)))) : typeof f ->f : typeof f ->(f(f(i))) : typeof f ->f(f(i)) : typeof f ->f : typeof f ->f(i) : typeof f ->f : typeof f +>f((f(f(i)))) : (p: I) => typeof f +>f : (p: I) => typeof f +>(f(f(i))) : (p: I) => typeof f +>f(f(i)) : (p: I) => typeof f +>f : (p: I) => typeof f +>f(i) : (p: I) => typeof f +>f : (p: I) => typeof f >i : I } diff --git a/tests/baselines/reference/recursiveComplicatedClasses.types b/tests/baselines/reference/recursiveComplicatedClasses.types index cb0db56e69b..d969bbfcea0 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.types +++ b/tests/baselines/reference/recursiveComplicatedClasses.types @@ -8,7 +8,7 @@ class Signature { } function aEnclosesB(a: Symbol) { ->aEnclosesB : typeof aEnclosesB +>aEnclosesB : (a: Symbol) => boolean >a : Symbol >Symbol : Symbol @@ -30,7 +30,7 @@ class Symbol { return aEnclosesB(b); >aEnclosesB(b) : boolean ->aEnclosesB : typeof aEnclosesB +>aEnclosesB : (a: Symbol) => boolean >b : TypeSymbol } diff --git a/tests/baselines/reference/recursiveGenericMethodCall.types b/tests/baselines/reference/recursiveGenericMethodCall.types index 948790e31fa..ef03ca545df 100644 --- a/tests/baselines/reference/recursiveGenericMethodCall.types +++ b/tests/baselines/reference/recursiveGenericMethodCall.types @@ -5,7 +5,7 @@ interface Generator { (): T; } >T : T function Generate(func: Generator): T { ->Generate : typeof Generate +>Generate : (func: Generator) => T >T : T >func : Generator >Generator : Generator @@ -14,7 +14,7 @@ function Generate(func: Generator): T { return Generate(func); >Generate(func) : T ->Generate : typeof Generate +>Generate : (func: Generator) => T >func : Generator } diff --git a/tests/baselines/reference/recursiveGenericSignatureInstantiation.types b/tests/baselines/reference/recursiveGenericSignatureInstantiation.types index 8d61d58549c..f1e93270396 100644 --- a/tests/baselines/reference/recursiveGenericSignatureInstantiation.types +++ b/tests/baselines/reference/recursiveGenericSignatureInstantiation.types @@ -1,13 +1,13 @@ === tests/cases/compiler/recursiveGenericSignatureInstantiation.ts === function f6(x: T) { ->f6 : typeof f6 +>f6 : (x: T) => any >T : T >x : T >T : T return f6(x); >f6(x) : any ->f6 : typeof f6 +>f6 : (x: T) => any >x : T } diff --git a/tests/baselines/reference/recursiveIdenticalOverloadResolution.types b/tests/baselines/reference/recursiveIdenticalOverloadResolution.types index 18000888d4f..e2ec96b1c82 100644 --- a/tests/baselines/reference/recursiveIdenticalOverloadResolution.types +++ b/tests/baselines/reference/recursiveIdenticalOverloadResolution.types @@ -10,35 +10,35 @@ module M { >I : I function f(p: I) { return f }; ->f : typeof f +>f : (p: I) => typeof f >p : I >I : I ->f : typeof f +>f : (p: I) => typeof f var i: I; >i : I >I : I f(i); ->f(i) : typeof f ->f : typeof f +>f(i) : (p: I) => typeof f +>f : (p: I) => typeof f >i : I f(f(i)); ->f(f(i)) : typeof f ->f : typeof f ->f(i) : typeof f ->f : typeof f +>f(f(i)) : (p: I) => typeof f +>f : (p: I) => typeof f +>f(i) : (p: I) => typeof f +>f : (p: I) => typeof f >i : I f((f(f(i)))); ->f((f(f(i)))) : typeof f ->f : typeof f ->(f(f(i))) : typeof f ->f(f(i)) : typeof f ->f : typeof f ->f(i) : typeof f ->f : typeof f +>f((f(f(i)))) : (p: I) => typeof f +>f : (p: I) => typeof f +>(f(f(i))) : (p: I) => typeof f +>f(f(i)) : (p: I) => typeof f +>f : (p: I) => typeof f +>f(i) : (p: I) => typeof f +>f : (p: I) => typeof f >i : I } diff --git a/tests/baselines/reference/recursiveInference1.types b/tests/baselines/reference/recursiveInference1.types index 02688f17705..3fef5dbb805 100644 --- a/tests/baselines/reference/recursiveInference1.types +++ b/tests/baselines/reference/recursiveInference1.types @@ -1,6 +1,6 @@ === tests/cases/compiler/recursiveInference1.ts === function fib(x:number) { return x <= 1 ? x : fib(x - 1) + fib(x - 2); } ->fib : typeof fib +>fib : (x: number) => any >x : number >x <= 1 ? x : fib(x - 1) + fib(x - 2) : any >x <= 1 : boolean @@ -8,16 +8,16 @@ function fib(x:number) { return x <= 1 ? x : fib(x - 1) + fib(x - 2); } >x : number >fib(x - 1) + fib(x - 2) : any >fib(x - 1) : any ->fib : typeof fib +>fib : (x: number) => any >x - 1 : number >x : number >fib(x - 2) : any ->fib : typeof fib +>fib : (x: number) => any >x - 2 : number >x : number var result = fib(5); >result : any >fib(5) : any ->fib : typeof fib +>fib : (x: number) => any diff --git a/tests/baselines/reference/recursiveMods.types b/tests/baselines/reference/recursiveMods.types index 016b9a72129..a02156a6e9b 100644 --- a/tests/baselines/reference/recursiveMods.types +++ b/tests/baselines/reference/recursiveMods.types @@ -10,12 +10,12 @@ export module Foo { >Foo : typeof Foo function Bar() : C { ->Bar : typeof Bar +>Bar : () => C >C : C if (true) { return Bar();} >Bar() : C ->Bar : typeof Bar +>Bar : () => C return new C(); >new C() : C @@ -23,27 +23,27 @@ export module Foo { } function Baz() : C { ->Baz : typeof Baz +>Baz : () => C >C : C var c = Baz(); >c : C >Baz() : C ->Baz : typeof Baz +>Baz : () => C return Bar(); >Bar() : C ->Bar : typeof Bar +>Bar : () => C } function Gar() { ->Gar : typeof Gar +>Gar : () => void var c : C = Baz(); >c : C >C : C >Baz() : C ->Baz : typeof Baz +>Baz : () => C return; } diff --git a/tests/baselines/reference/recursiveReturns.types b/tests/baselines/reference/recursiveReturns.types index a62578cf41a..dfb54f126a3 100644 --- a/tests/baselines/reference/recursiveReturns.types +++ b/tests/baselines/reference/recursiveReturns.types @@ -1,21 +1,21 @@ === tests/cases/compiler/recursiveReturns.ts === function R1() { ->R1 : typeof R1 +>R1 : () => void R1(); >R1() : void ->R1 : typeof R1 +>R1 : () => void return; } function R2() { R2(); } ->R2 : typeof R2 +>R2 : () => void >R2() : void ->R2 : typeof R2 +>R2 : () => void function R3(n:number) { ->R3 : typeof R3 +>R3 : (n: number) => void >n : number if (n == 0) { @@ -27,7 +27,7 @@ function R3(n:number) { else { R3(n--); >R3(n--) : void ->R3 : typeof R3 +>R3 : (n: number) => void >n-- : number >n : number } diff --git a/tests/baselines/reference/restParameterNoTypeAnnotation.types b/tests/baselines/reference/restParameterNoTypeAnnotation.types index d4b5f3ed850..0298ff37ca5 100644 --- a/tests/baselines/reference/restParameterNoTypeAnnotation.types +++ b/tests/baselines/reference/restParameterNoTypeAnnotation.types @@ -1,6 +1,6 @@ === tests/cases/compiler/restParameterNoTypeAnnotation.ts === function foo(...rest) { ->foo : typeof foo +>foo : (...rest: any[]) => number >rest : any[] var x: number = rest[0]; diff --git a/tests/baselines/reference/restParameters.types b/tests/baselines/reference/restParameters.types index dea68d33762..441635287ea 100644 --- a/tests/baselines/reference/restParameters.types +++ b/tests/baselines/reference/restParameters.types @@ -1,23 +1,23 @@ === tests/cases/compiler/restParameters.ts === function f18(a?:string, ...b:number[]){} ->f18 : typeof f18 +>f18 : (a?: string, ...b: number[]) => void >a : string >b : number[] function f19(a?:string, b?:number, ...c:number[]){} ->f19 : typeof f19 +>f19 : (a?: string, b?: number, ...c: number[]) => void >a : string >b : number >c : number[] function f20(a:string, b?:string, ...c:number[]){} ->f20 : typeof f20 +>f20 : (a: string, b?: string, ...c: number[]) => void >a : string >b : string >c : number[] function f21(a:string, b?:string, c?:number, ...d:number[]){} ->f21 : typeof f21 +>f21 : (a: string, b?: string, c?: number, ...d: number[]) => void >a : string >b : string >c : number diff --git a/tests/baselines/reference/returnStatement1.types b/tests/baselines/reference/returnStatement1.types index 37c2db7b5e7..b7a668bfa03 100644 --- a/tests/baselines/reference/returnStatement1.types +++ b/tests/baselines/reference/returnStatement1.types @@ -1,6 +1,6 @@ === tests/cases/compiler/returnStatement1.ts === function f() { ->f : typeof f +>f : () => (s: any) => void return function (s) { >function (s) { var x = s; } : (s: any) => void diff --git a/tests/baselines/reference/returnStatements.types b/tests/baselines/reference/returnStatements.types index 0a4b81f6873..58d2a251b0e 100644 --- a/tests/baselines/reference/returnStatements.types +++ b/tests/baselines/reference/returnStatements.types @@ -1,32 +1,32 @@ === tests/cases/conformance/statements/returnStatements/returnStatements.ts === // all the following should be valid function fn1(): number { return 1; } ->fn1 : typeof fn1 +>fn1 : () => number function fn2(): string { return ''; } ->fn2 : typeof fn2 +>fn2 : () => string function fn3(): void { return undefined; } ->fn3 : typeof fn3 +>fn3 : () => void >undefined : undefined function fn4(): void { return; } ->fn4 : typeof fn4 +>fn4 : () => void function fn5(): boolean { return true; } ->fn5 : typeof fn5 +>fn5 : () => boolean function fn6(): Date { return new Date(12); } ->fn6 : typeof fn6 +>fn6 : () => Date >Date : Date >new Date(12) : Date >Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; } function fn7(): any { return null; } ->fn7 : typeof fn7 +>fn7 : () => any function fn8(): any { return; } // OK, eq. to 'return undefined' ->fn8 : typeof fn8 +>fn8 : () => any interface I { id: number } >I : I @@ -50,24 +50,24 @@ class D extends C { >name : string } function fn10(): I { return { id: 12 }; } ->fn10 : typeof fn10 +>fn10 : () => I >I : I >{ id: 12 } : { id: number; } >id : number function fn11(): I { return new C(); } ->fn11 : typeof fn11 +>fn11 : () => I >I : I >new C() : C >C : typeof C function fn12(): C { return new D(); } ->fn12 : typeof fn12 +>fn12 : () => C >C : C >new D() : D >D : typeof D function fn13(): C { return null; } ->fn13 : typeof fn13 +>fn13 : () => C >C : C diff --git a/tests/baselines/reference/returnTypeParameterWithModules.types b/tests/baselines/reference/returnTypeParameterWithModules.types index 68161de58c7..adcc1b4bcee 100644 --- a/tests/baselines/reference/returnTypeParameterWithModules.types +++ b/tests/baselines/reference/returnTypeParameterWithModules.types @@ -3,7 +3,7 @@ module M1 { >M1 : typeof M1 export function reduce(ar, f, e?): Array { ->reduce : typeof reduce +>reduce : (ar: any, f: any, e?: any) => A[] >A : A >ar : any >f : any @@ -39,19 +39,19 @@ module M2 { >M1 : typeof A export function compose() { ->compose : typeof compose +>compose : () => void A.reduce(arguments, compose2); >A.reduce(arguments, compose2) : {}[] ->A.reduce : typeof A.reduce +>A.reduce : (ar: any, f: any, e?: any) => A[] >A : typeof A ->reduce : typeof A.reduce +>reduce : (ar: any, f: any, e?: any) => A[] >arguments : IArguments ->compose2 : typeof compose2 +>compose2 : (g: (x: B) => C, f: (x: D) => B) => (x: D) => C }; export function compose2(g: (x: B) => C, f: (x: D) => B): (x: D) => C { ->compose2 : typeof compose2 +>compose2 : (g: (x: B) => C, f: (x: D) => B) => (x: D) => C >B : B >C : C >D : D diff --git a/tests/baselines/reference/reverseInferenceInContextualInstantiation.types b/tests/baselines/reference/reverseInferenceInContextualInstantiation.types index 60ca53a0c94..d38d0423e84 100644 --- a/tests/baselines/reference/reverseInferenceInContextualInstantiation.types +++ b/tests/baselines/reference/reverseInferenceInContextualInstantiation.types @@ -1,6 +1,6 @@ === tests/cases/compiler/reverseInferenceInContextualInstantiation.ts === function compare(a: T, b: T): number { return 0; } ->compare : typeof compare +>compare : (a: T, b: T) => number >T : T >a : T >T : T @@ -15,5 +15,5 @@ x.sort(compare); // Error, but shouldn't be >x.sort : (compareFn?: (a: number, b: number) => number) => number[] >x : number[] >sort : (compareFn?: (a: number, b: number) => number) => number[] ->compare : typeof compare +>compare : (a: T, b: T) => number diff --git a/tests/baselines/reference/scopeResolutionIdentifiers.types b/tests/baselines/reference/scopeResolutionIdentifiers.types index daac3c316e4..37fa897863d 100644 --- a/tests/baselines/reference/scopeResolutionIdentifiers.types +++ b/tests/baselines/reference/scopeResolutionIdentifiers.types @@ -33,7 +33,7 @@ module M2 { } function fn() { ->fn : typeof fn +>fn : () => void var s: boolean; >s : boolean diff --git a/tests/baselines/reference/separate1-2.types b/tests/baselines/reference/separate1-2.types index 9e07b3f7a5b..11b19d0b476 100644 --- a/tests/baselines/reference/separate1-2.types +++ b/tests/baselines/reference/separate1-2.types @@ -3,5 +3,5 @@ module X { >X : typeof X export function f() { } ->f : typeof f +>f : () => void } diff --git a/tests/baselines/reference/sourceMap-FileWithComments.types b/tests/baselines/reference/sourceMap-FileWithComments.types index 053a73c42ce..ecb32311c4a 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.types +++ b/tests/baselines/reference/sourceMap-FileWithComments.types @@ -57,7 +57,7 @@ module Shapes { >a : number export function foo() { ->foo : typeof foo +>foo : () => void } /** comment after function diff --git a/tests/baselines/reference/sourceMapValidationClasses.types b/tests/baselines/reference/sourceMapValidationClasses.types index 8deaf6c2ce8..d53cdcb9974 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.types +++ b/tests/baselines/reference/sourceMapValidationClasses.types @@ -26,7 +26,7 @@ module Foo.Bar { function foo(greeting: string): Greeter { ->foo : typeof foo +>foo : (greeting: string) => Greeter >greeting : string >Greeter : Greeter @@ -49,7 +49,7 @@ module Foo.Bar { >greet : () => string function foo2(greeting: string, ...restGreetings /* more greeting */: string[]) { ->foo2 : typeof foo2 +>foo2 : (greeting: string, ...restGreetings: string[]) => Greeter[] >greeting : string >restGreetings : string[] @@ -95,7 +95,7 @@ module Foo.Bar { var b = foo2("Hello", "World", "!"); >b : Greeter[] >foo2("Hello", "World", "!") : Greeter[] ->foo2 : typeof foo2 +>foo2 : (greeting: string, ...restGreetings: string[]) => Greeter[] // This is simple signle line comment for (var j = 0; j < b.length; j++) { diff --git a/tests/baselines/reference/sourceMapValidationFunctions.types b/tests/baselines/reference/sourceMapValidationFunctions.types index e6d2c156496..0d110ece2d2 100644 --- a/tests/baselines/reference/sourceMapValidationFunctions.types +++ b/tests/baselines/reference/sourceMapValidationFunctions.types @@ -3,7 +3,7 @@ var greetings = 0; >greetings : number function greet(greeting: string): number { ->greet : typeof greet +>greet : (greeting: string) => number >greeting : string greetings++; @@ -14,7 +14,7 @@ function greet(greeting: string): number { >greetings : number } function greet2(greeting: string, n = 10, x?: string, ...restParams: string[]): number { ->greet2 : typeof greet2 +>greet2 : (greeting: string, n?: number, x?: string, ...restParams: string[]) => number >greeting : string >n : number >x : string @@ -28,7 +28,7 @@ function greet2(greeting: string, n = 10, x?: string, ...restParams: string[]): >greetings : number } function foo(greeting: string, n = 10, x?: string, ...restParams: string[]) ->foo : typeof foo +>foo : (greeting: string, n?: number, x?: string, ...restParams: string[]) => void >greeting : string >n : number >x : string diff --git a/tests/baselines/reference/sourceMapValidationModule.types b/tests/baselines/reference/sourceMapValidationModule.types index 38c0c3e8392..6c77a0b9b44 100644 --- a/tests/baselines/reference/sourceMapValidationModule.types +++ b/tests/baselines/reference/sourceMapValidationModule.types @@ -20,7 +20,7 @@ module m3 { } export function foo() { ->foo : typeof foo +>foo : () => number return m4.x; >m4.x : number diff --git a/tests/baselines/reference/specializationsShouldNotAffectEachOther.types b/tests/baselines/reference/specializationsShouldNotAffectEachOther.types index f8ca3216848..9bf91e6fe42 100644 --- a/tests/baselines/reference/specializationsShouldNotAffectEachOther.types +++ b/tests/baselines/reference/specializationsShouldNotAffectEachOther.types @@ -13,7 +13,7 @@ var series: Series; function foo() { ->foo : typeof foo +>foo : () => any var seriesExtent = (series) => null; >seriesExtent : (series: any) => any diff --git a/tests/baselines/reference/specializeVarArgs1.types b/tests/baselines/reference/specializeVarArgs1.types index 8c9175b9d4f..4cdf5790983 100644 --- a/tests/baselines/reference/specializeVarArgs1.types +++ b/tests/baselines/reference/specializeVarArgs1.types @@ -23,7 +23,7 @@ interface ObservableArray extends Observable function observableArray(): ObservableArray { return null;} ->observableArray : typeof observableArray +>observableArray : () => ObservableArray >T : T >ObservableArray : ObservableArray >T : T @@ -33,7 +33,7 @@ function observableArray(): ObservableArray { return null;} var a = observableArray(); >a : ObservableArray >observableArray() : ObservableArray ->observableArray : typeof observableArray +>observableArray : () => ObservableArray a.push('Some Value'); >a.push('Some Value') : any diff --git a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types index e28c8144d02..cb86966d65a 100644 --- a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types +++ b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.types @@ -3,15 +3,15 @@ // All the below should not be errors function foo(x: 'a'); ->foo : typeof foo +>foo : { (x: 'a'): any; (x: string): any; } >x : 'a' function foo(x: string); ->foo : typeof foo +>foo : { (x: 'a'): any; (x: string): any; } >x : string function foo(x: any) { } ->foo : typeof foo +>foo : { (x: 'a'): any; (x: string): any; } >x : any class C { diff --git a/tests/baselines/reference/staticInheritance.types b/tests/baselines/reference/staticInheritance.types index d4926e059c9..04c64281ba8 100644 --- a/tests/baselines/reference/staticInheritance.types +++ b/tests/baselines/reference/staticInheritance.types @@ -1,6 +1,6 @@ === tests/cases/compiler/staticInheritance.ts === function doThing(x: { n: string }) { } ->doThing : typeof doThing +>doThing : (x: { n: string; }) => void >x : { n: string; } >n : string @@ -13,7 +13,7 @@ class A { p = doThing(A); // OK >p : void >doThing(A) : void ->doThing : typeof doThing +>doThing : (x: { n: string; }) => void >A : typeof A } class B extends A { @@ -23,17 +23,17 @@ class B extends A { p1 = doThing(A); // OK >p1 : void >doThing(A) : void ->doThing : typeof doThing +>doThing : (x: { n: string; }) => void >A : typeof A p2 = doThing(B); // OK >p2 : void >doThing(B) : void ->doThing : typeof doThing +>doThing : (x: { n: string; }) => void >B : typeof B } doThing(B); //OK >doThing(B) : void ->doThing : typeof doThing +>doThing : (x: { n: string; }) => void >B : typeof B diff --git a/tests/baselines/reference/stradac.types b/tests/baselines/reference/stradac.types index a720e3e608d..6fc9bb282be 100644 --- a/tests/baselines/reference/stradac.types +++ b/tests/baselines/reference/stradac.types @@ -10,7 +10,7 @@ var x = 10; function foo() { ->foo : typeof foo +>foo : () => void x++; >x++ : number diff --git a/tests/baselines/reference/strictMode2.types b/tests/baselines/reference/strictMode2.types index 87d6db600d6..69c972355b8 100644 --- a/tests/baselines/reference/strictMode2.types +++ b/tests/baselines/reference/strictMode2.types @@ -2,7 +2,7 @@ "use strict"; function foo() { ->foo : typeof foo +>foo : () => number return 30; } diff --git a/tests/baselines/reference/strictMode3.types b/tests/baselines/reference/strictMode3.types index fce99bbcb45..701ebc12d9a 100644 --- a/tests/baselines/reference/strictMode3.types +++ b/tests/baselines/reference/strictMode3.types @@ -11,7 +11,7 @@ class B extends A { } function foo() { ->foo : typeof foo +>foo : () => any return this.window; >this.window : any diff --git a/tests/baselines/reference/strictMode5.types b/tests/baselines/reference/strictMode5.types index 8901401c616..dd668dc24d1 100644 --- a/tests/baselines/reference/strictMode5.types +++ b/tests/baselines/reference/strictMode5.types @@ -1,6 +1,6 @@ === tests/cases/compiler/strictMode5.ts === function foo(...args) { ->foo : typeof foo +>foo : (...args: any[]) => void >args : any[] "use strict" @@ -31,7 +31,7 @@ class A { } function bar(x: number = 10) { ->bar : typeof bar +>bar : (x?: number) => void >x : number "use strict" diff --git a/tests/baselines/reference/structural1.types b/tests/baselines/reference/structural1.types index cb0e8a356a5..dcbfc8a3bb7 100644 --- a/tests/baselines/reference/structural1.types +++ b/tests/baselines/reference/structural1.types @@ -13,14 +13,14 @@ module M { } export function f(i:I) { ->f : typeof f +>f : (i: I) => void >i : I >I : I } f({salt:2,pepper:0}); >f({salt:2,pepper:0}) : void ->f : typeof f +>f : (i: I) => void >{salt:2,pepper:0} : { salt: number; pepper: number; } >salt : number >pepper : number diff --git a/tests/baselines/reference/subtypingWithCallSignatures.types b/tests/baselines/reference/subtypingWithCallSignatures.types index c9c35c1cd55..49b5bf299ab 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures.types +++ b/tests/baselines/reference/subtypingWithCallSignatures.types @@ -3,46 +3,46 @@ module CallSignature { >CallSignature : typeof CallSignature declare function foo1(cb: (x: number) => void): typeof cb; ->foo1 : typeof foo1 +>foo1 : { (cb: (x: number) => void): (x: number) => void; (cb: any): any; } >cb : (x: number) => void >x : number >cb : (x: number) => void declare function foo1(cb: any): any; ->foo1 : typeof foo1 +>foo1 : { (cb: (x: number) => void): (x: number) => void; (cb: any): any; } >cb : any var r = foo1((x: number) => 1); // ok because base returns void >r : (x: number) => void >foo1((x: number) => 1) : (x: number) => void ->foo1 : typeof foo1 +>foo1 : { (cb: (x: number) => void): (x: number) => void; (cb: any): any; } >(x: number) => 1 : (x: number) => number >x : number var r2 = foo1((x: T) => ''); // ok because base returns void >r2 : (x: number) => void >foo1((x: T) => '') : (x: number) => void ->foo1 : typeof foo1 +>foo1 : { (cb: (x: number) => void): (x: number) => void; (cb: any): any; } >(x: T) => '' : (x: T) => string >T : T >x : T >T : T declare function foo2(cb: (x: number, y: number) => void): typeof cb; ->foo2 : typeof foo2 +>foo2 : { (cb: (x: number, y: number) => void): (x: number, y: number) => void; (cb: any): any; } >cb : (x: number, y: number) => void >x : number >y : number >cb : (x: number, y: number) => void declare function foo2(cb: any): any; ->foo2 : typeof foo2 +>foo2 : { (cb: (x: number, y: number) => void): (x: number, y: number) => void; (cb: any): any; } >cb : any var r3 = foo2((x: number, y: number) => 1); // ok because base returns void >r3 : (x: number, y: number) => void >foo2((x: number, y: number) => 1) : (x: number, y: number) => void ->foo2 : typeof foo2 +>foo2 : { (cb: (x: number, y: number) => void): (x: number, y: number) => void; (cb: any): any; } >(x: number, y: number) => 1 : (x: number, y: number) => number >x : number >y : number @@ -50,7 +50,7 @@ module CallSignature { var r4 = foo2((x: T) => ''); // ok because base returns void >r4 : (x: number, y: number) => void >foo2((x: T) => '') : (x: number, y: number) => void ->foo2 : typeof foo2 +>foo2 : { (cb: (x: number, y: number) => void): (x: number, y: number) => void; (cb: any): any; } >(x: T) => '' : (x: T) => string >T : T >x : T diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.types b/tests/baselines/reference/subtypingWithCallSignatures2.types index 91984c6aba2..5006e00d52b 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.types +++ b/tests/baselines/reference/subtypingWithCallSignatures2.types @@ -21,59 +21,59 @@ class OtherDerived extends Base { bing: string; } >bing : string declare function foo1(a: (x: number) => number[]): typeof a; ->foo1 : typeof foo1 +>foo1 : { (a: (x: number) => number[]): (x: number) => number[]; (a: any): any; } >a : (x: number) => number[] >x : number >a : (x: number) => number[] declare function foo1(a: any): any; ->foo1 : typeof foo1 +>foo1 : { (a: (x: number) => number[]): (x: number) => number[]; (a: any): any; } >a : any declare function foo2(a: (x: number) => string[]): typeof a; ->foo2 : typeof foo2 +>foo2 : { (a: (x: number) => string[]): (x: number) => string[]; (a: any): any; } >a : (x: number) => string[] >x : number >a : (x: number) => string[] declare function foo2(a: any): any; ->foo2 : typeof foo2 +>foo2 : { (a: (x: number) => string[]): (x: number) => string[]; (a: any): any; } >a : any declare function foo3(a: (x: number) => void): typeof a; ->foo3 : typeof foo3 +>foo3 : { (a: (x: number) => void): (x: number) => void; (a: any): any; } >a : (x: number) => void >x : number >a : (x: number) => void declare function foo3(a: any): any; ->foo3 : typeof foo3 +>foo3 : { (a: (x: number) => void): (x: number) => void; (a: any): any; } >a : any declare function foo4(a: (x: string, y: number) => string): typeof a; ->foo4 : typeof foo4 +>foo4 : { (a: (x: string, y: number) => string): (x: string, y: number) => string; (a: any): any; } >a : (x: string, y: number) => string >x : string >y : number >a : (x: string, y: number) => string declare function foo4(a: any): any; ->foo4 : typeof foo4 +>foo4 : { (a: (x: string, y: number) => string): (x: string, y: number) => string; (a: any): any; } >a : any declare function foo5(a: (x: (arg: string) => number) => string): typeof a; ->foo5 : typeof foo5 +>foo5 : { (a: (x: (arg: string) => number) => string): (x: (arg: string) => number) => string; (a: any): any; } >a : (x: (arg: string) => number) => string >x : (arg: string) => number >arg : string >a : (x: (arg: string) => number) => string declare function foo5(a: any): any; ->foo5 : typeof foo5 +>foo5 : { (a: (x: (arg: string) => number) => string): (x: (arg: string) => number) => string; (a: any): any; } >a : any declare function foo6(a: (x: (arg: Base) => Derived) => Base): typeof a; ->foo6 : typeof foo6 +>foo6 : { (a: (x: (arg: Base) => Derived) => Base): (x: (arg: Base) => Derived) => Base; (a: any): any; } >a : (x: (arg: Base) => Derived) => Base >x : (arg: Base) => Derived >arg : Base @@ -83,11 +83,11 @@ declare function foo6(a: (x: (arg: Base) => Derived) => Base): typeof a; >a : (x: (arg: Base) => Derived) => Base declare function foo6(a: any): any; ->foo6 : typeof foo6 +>foo6 : { (a: (x: (arg: Base) => Derived) => Base): (x: (arg: Base) => Derived) => Base; (a: any): any; } >a : any declare function foo7(a: (x: (arg: Base) => Derived) => (r: Base) => Derived): typeof a; ->foo7 : typeof foo7 +>foo7 : { (a: (x: (arg: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived) => (r: Base) => Derived; (a: any): any; } >a : (x: (arg: Base) => Derived) => (r: Base) => Derived >x : (arg: Base) => Derived >arg : Base @@ -99,11 +99,11 @@ declare function foo7(a: (x: (arg: Base) => Derived) => (r: Base) => Derived): t >a : (x: (arg: Base) => Derived) => (r: Base) => Derived declare function foo7(a: any): any; ->foo7 : typeof foo7 +>foo7 : { (a: (x: (arg: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived) => (r: Base) => Derived; (a: any): any; } >a : any declare function foo8(a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): typeof a; ->foo8 : typeof foo8 +>foo8 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; } >a : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived >x : (arg: Base) => Derived >arg : Base @@ -119,11 +119,11 @@ declare function foo8(a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) >a : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived declare function foo8(a: any): any; ->foo8 : typeof foo8 +>foo8 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; } >a : any declare function foo9(a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): typeof a; ->foo9 : typeof foo9 +>foo9 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; } >a : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived >x : (arg: Base) => Derived >arg : Base @@ -139,11 +139,11 @@ declare function foo9(a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) >a : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived declare function foo9(a: any): any; ->foo9 : typeof foo9 +>foo9 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; } >a : any declare function foo10(a: (...x: Derived[]) => Derived): typeof a; ->foo10 : typeof foo10 +>foo10 : { (a: (...x: Derived[]) => Derived): (...x: Derived[]) => Derived; (a: any): any; } >a : (...x: Derived[]) => Derived >x : Derived[] >Derived : Derived @@ -151,11 +151,11 @@ declare function foo10(a: (...x: Derived[]) => Derived): typeof a; >a : (...x: Derived[]) => Derived declare function foo10(a: any): any; ->foo10 : typeof foo10 +>foo10 : { (a: (...x: Derived[]) => Derived): (...x: Derived[]) => Derived; (a: any): any; } >a : any declare function foo11(a: (x: { foo: string }, y: { foo: string; bar: string }) => Base): typeof a; ->foo11 : typeof foo11 +>foo11 : { (a: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a: any): any; } >a : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string @@ -166,11 +166,11 @@ declare function foo11(a: (x: { foo: string }, y: { foo: string; bar: string }) >a : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base declare function foo11(a: any): any; ->foo11 : typeof foo11 +>foo11 : { (a: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a: any): any; } >a : any declare function foo12(a: (x: Array, y: Array) => Array): typeof a; ->foo12 : typeof foo12 +>foo12 : { (a: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a: any): any; } >a : (x: Base[], y: Derived2[]) => Derived[] >x : Base[] >Array : T[] @@ -183,11 +183,11 @@ declare function foo12(a: (x: Array, y: Array) => Array >a : (x: Base[], y: Derived2[]) => Derived[] declare function foo12(a: any): any; ->foo12 : typeof foo12 +>foo12 : { (a: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a: any): any; } >a : any declare function foo13(a: (x: Array, y: Array) => Array): typeof a; ->foo13 : typeof foo13 +>foo13 : { (a: (x: Base[], y: Derived[]) => Derived[]): (x: Base[], y: Derived[]) => Derived[]; (a: any): any; } >a : (x: Base[], y: Derived[]) => Derived[] >x : Base[] >Array : T[] @@ -200,11 +200,11 @@ declare function foo13(a: (x: Array, y: Array) => Array) >a : (x: Base[], y: Derived[]) => Derived[] declare function foo13(a: any): any; ->foo13 : typeof foo13 +>foo13 : { (a: (x: Base[], y: Derived[]) => Derived[]): (x: Base[], y: Derived[]) => Derived[]; (a: any): any; } >a : any declare function foo14(a: (x: { a: string; b: number }) => Object): typeof a; ->foo14 : typeof foo14 +>foo14 : { (a: (x: { a: string; b: number; }) => Object): (x: { a: string; b: number; }) => Object; (a: any): any; } >a : (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string @@ -213,11 +213,11 @@ declare function foo14(a: (x: { a: string; b: number }) => Object): typeof a; >a : (x: { a: string; b: number; }) => Object declare function foo14(a: any): any; ->foo14 : typeof foo14 +>foo14 : { (a: (x: { a: string; b: number; }) => Object): (x: { a: string; b: number; }) => Object; (a: any): any; } >a : any declare function foo15(a: { ->foo15 : typeof foo15 +>foo15 : { (a: { (x: number): number[]; (x: string): string[]; }): { (x: number): number[]; (x: string): string[]; }; (a: any): any; } >a : { (x: number): number[]; (x: string): string[]; } (x: number): number[]; @@ -230,11 +230,11 @@ declare function foo15(a: { >a : { (x: number): number[]; (x: string): string[]; } declare function foo15(a: any): any; ->foo15 : typeof foo15 +>foo15 : { (a: { (x: number): number[]; (x: string): string[]; }): { (x: number): number[]; (x: string): string[]; }; (a: any): any; } >a : any declare function foo16(a: { ->foo16 : typeof foo16 +>foo16 : { (a: { (x: T): number[]; (x: U): number[]; }): { (x: T): number[]; (x: U): number[]; }; (a: any): any; } >a : { (x: T): number[]; (x: U): number[]; } (x: T): number[]; @@ -253,11 +253,11 @@ declare function foo16(a: { >a : { (x: T): number[]; (x: U): number[]; } declare function foo16(a: any): any; ->foo16 : typeof foo16 +>foo16 : { (a: { (x: T): number[]; (x: U): number[]; }): { (x: T): number[]; (x: U): number[]; }; (a: any): any; } >a : any declare function foo17(a: { ->foo17 : typeof foo17 +>foo17 : { (a: { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }): { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }; (a: any): any; } >a : { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; } (x: (a: number) => number): number[]; @@ -272,11 +272,11 @@ declare function foo17(a: { >a : { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; } declare function foo17(a: any): any; ->foo17 : typeof foo17 +>foo17 : { (a: { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }): { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }; (a: any): any; } >a : any declare function foo18(a: { ->foo18 : typeof foo18 +>foo18 : { (a: { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }): { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }; (a: any): any; } >a : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; } (x: { @@ -305,7 +305,7 @@ declare function foo18(a: { >a : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; } declare function foo18(a: any): any; ->foo18 : typeof foo18 +>foo18 : { (a: { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }): { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }; (a: any): any; } >a : any var r1arg1 = (x: T) => [x]; @@ -326,7 +326,7 @@ var r1arg2 = (x: number) => [1]; var r1 = foo1(r1arg1); // any, return types are not subtype of first overload >r1 : any >foo1(r1arg1) : any ->foo1 : typeof foo1 +>foo1 : { (a: (x: number) => number[]): (x: number) => number[]; (a: any): any; } >r1arg1 : (x: T) => T[] var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions @@ -358,7 +358,7 @@ var r2arg2 = (x: number) => ['']; var r2 = foo2(r2arg1); >r2 : (x: number) => string[] >foo2(r2arg1) : (x: number) => string[] ->foo2 : typeof foo2 +>foo2 : { (a: (x: number) => string[]): (x: number) => string[]; (a: any): any; } >r2arg1 : (x: T) => string[] var r2a = [r2arg1, r2arg2]; @@ -389,7 +389,7 @@ var r3arg2 = (x: number) => { }; var r3 = foo3(r3arg1); >r3 : (x: number) => void >foo3(r3arg1) : (x: number) => void ->foo3 : typeof foo3 +>foo3 : { (a: (x: number) => void): (x: number) => void; (a: any): any; } >r3arg1 : (x: T) => T var r3a = [r3arg1, r3arg2]; @@ -424,7 +424,7 @@ var r4arg2 = (x: string, y: number) => ''; var r4 = foo4(r4arg1); // any >r4 : any >foo4(r4arg1) : any ->foo4 : typeof foo4 +>foo4 : { (a: (x: string, y: number) => string): (x: string, y: number) => string; (a: any): any; } >r4arg1 : (x: T, y: U) => T var r4a = [r4arg1, r4arg2]; @@ -460,7 +460,7 @@ var r5arg2 = (x: (arg: string) => number) => ''; var r5 = foo5(r5arg1); // any >r5 : any >foo5(r5arg1) : any ->foo5 : typeof foo5 +>foo5 : { (a: (x: (arg: string) => number) => string): (x: (arg: string) => number) => string; (a: any): any; } >r5arg1 : (x: (arg: T) => U) => T var r5a = [r5arg1, r5arg2]; @@ -502,7 +502,7 @@ var r6arg2 = (x: (arg: Base) => Derived) => null; var r6 = foo6(r6arg1); // any >r6 : any >foo6(r6arg1) : any ->foo6 : typeof foo6 +>foo6 : { (a: (x: (arg: Base) => Derived) => Base): (x: (arg: Base) => Derived) => Base; (a: any): any; } >r6arg1 : (x: (arg: T) => U) => T var r6a = [r6arg1, r6arg2]; @@ -550,7 +550,7 @@ var r7arg2 = (x: (arg: Base) => Derived) => (r: Base) => null; var r7 = foo7(r7arg1); // any >r7 : any >foo7(r7arg1) : any ->foo7 : typeof foo7 +>foo7 : { (a: (x: (arg: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived) => (r: Base) => Derived; (a: any): any; } >r7arg1 : (x: (arg: T) => U) => (r: T) => U var r7a = [r7arg1, r7arg2]; @@ -606,7 +606,7 @@ var r8arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base var r8 = foo8(r8arg1); // any >r8 : any >foo8(r8arg1) : any ->foo8 : typeof foo8 +>foo8 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; } >r8arg1 : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U var r8a = [r8arg1, r8arg2]; @@ -663,7 +663,7 @@ var r9arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base var r9 = foo9(r9arg1); // any >r9 : any >foo9(r9arg1) : any ->foo9 : typeof foo9 +>foo9 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; } >r9arg1 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U var r9a = [r9arg1, r9arg2]; @@ -699,7 +699,7 @@ var r10arg2 = (...x: Derived[]) => null; var r10 = foo10(r10arg1); // any >r10 : any >foo10(r10arg1) : any ->foo10 : typeof foo10 +>foo10 : { (a: (...x: Derived[]) => Derived): (...x: Derived[]) => Derived; (a: any): any; } >r10arg1 : (...x: T[]) => T var r10a = [r10arg1, r10arg2]; @@ -739,7 +739,7 @@ var r11arg2 = (x: { foo: string }, y: { foo: string; bar: string }) => nul var r11 = foo11(r11arg1); // any >r11 : any >foo11(r11arg1) : any ->foo11 : typeof foo11 +>foo11 : { (a: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a: any): any; } >r11arg1 : (x: T, y: T) => T var r11a = [r11arg1, r11arg2]; @@ -785,7 +785,7 @@ var r12arg2 = (x: Array, y: Array) => >null; var r12 = foo12(r12arg1); // any >r12 : (x: Base[], y: Derived2[]) => Derived[] >foo12(r12arg1) : (x: Base[], y: Derived2[]) => Derived[] ->foo12 : typeof foo12 +>foo12 : { (a: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a: any): any; } >r12arg1 : (x: Base[], y: T) => Derived[] var r12a = [r12arg1, r12arg2]; @@ -829,7 +829,7 @@ var r13arg2 = (x: Array, y: Array) => >null; var r13 = foo13(r13arg1); // any >r13 : any >foo13(r13arg1) : any ->foo13 : typeof foo13 +>foo13 : { (a: (x: Base[], y: Derived[]) => Derived[]): (x: Base[], y: Derived[]) => Derived[]; (a: any): any; } >r13arg1 : (x: Base[], y: T) => T var r13a = [r13arg1, r13arg2]; @@ -869,7 +869,7 @@ var r14arg2 = (x: { a: string; b: number }) => null; var r14 = foo14(r14arg1); // any >r14 : any >foo14(r14arg1) : any ->foo14 : typeof foo14 +>foo14 : { (a: (x: { a: string; b: number; }) => Object): (x: { a: string; b: number; }) => Object; (a: any): any; } >r14arg1 : (x: { a: T; b: T; }) => T var r14a = [r14arg1, r14arg2]; @@ -896,7 +896,7 @@ var r15arg1 = (x: T) => null var r15 = foo15(r15arg1); // any >r15 : any >foo15(r15arg1) : any ->foo15 : typeof foo15 +>foo15 : { (a: { (x: number): number[]; (x: string): string[]; }): { (x: number): number[]; (x: string): string[]; }; (a: any): any; } >r15arg1 : (x: T) => T[] var r16arg1 = (x: T) => [1]; @@ -911,7 +911,7 @@ var r16arg1 = (x: T) => [1]; var r16 = foo16(r16arg1); >r16 : { (x: T): number[]; (x: U): number[]; } >foo16(r16arg1) : { (x: T): number[]; (x: U): number[]; } ->foo16 : typeof foo16 +>foo16 : { (a: { (x: T): number[]; (x: U): number[]; }): { (x: T): number[]; (x: U): number[]; }; (a: any): any; } >r16arg1 : (x: T) => number[] var r17arg1 = (x: (a: T) => T) => null; @@ -928,7 +928,7 @@ var r17arg1 = (x: (a: T) => T) => null; var r17 = foo17(r17arg1); // any >r17 : any >foo17(r17arg1) : any ->foo17 : typeof foo17 +>foo17 : { (a: { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }): { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }; (a: any): any; } >r17arg1 : (x: (a: T) => T) => T[] var r18arg1 = (x: (a: T) => T) => null; @@ -945,6 +945,6 @@ var r18arg1 = (x: (a: T) => T) => null; var r18 = foo18(r18arg1); >r18 : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; } >foo18(r18arg1) : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; } ->foo18 : typeof foo18 +>foo18 : { (a: { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }): { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }; (a: any): any; } >r18arg1 : (x: (a: T) => T) => T[] diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.types b/tests/baselines/reference/subtypingWithCallSignatures3.types index 122301a477d..8c136113464 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.types +++ b/tests/baselines/reference/subtypingWithCallSignatures3.types @@ -25,17 +25,17 @@ module Errors { >bing : string declare function foo2(a2: (x: number) => string[]): typeof a2; ->foo2 : typeof foo2 +>foo2 : { (a2: (x: number) => string[]): (x: number) => string[]; (a2: any): any; } >a2 : (x: number) => string[] >x : number >a2 : (x: number) => string[] declare function foo2(a2: any): any; ->foo2 : typeof foo2 +>foo2 : { (a2: (x: number) => string[]): (x: number) => string[]; (a2: any): any; } >a2 : any declare function foo7(a2: (x: (arg: Base) => Derived) => (r: Base) => Derived2): typeof a2; ->foo7 : typeof foo7 +>foo7 : { (a2: (x: (arg: Base) => Derived) => (r: Base) => Derived2): (x: (arg: Base) => Derived) => (r: Base) => Derived2; (a2: any): any; } >a2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2 >x : (arg: Base) => Derived >arg : Base @@ -47,11 +47,11 @@ module Errors { >a2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2 declare function foo7(a2: any): any; ->foo7 : typeof foo7 +>foo7 : { (a2: (x: (arg: Base) => Derived) => (r: Base) => Derived2): (x: (arg: Base) => Derived) => (r: Base) => Derived2; (a2: any): any; } >a2 : any declare function foo8(a2: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): typeof a2; ->foo8 : typeof foo8 +>foo8 : { (a2: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a2: any): any; } >a2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived >x : (arg: Base) => Derived >arg : Base @@ -67,11 +67,11 @@ module Errors { >a2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived declare function foo8(a2: any): any; ->foo8 : typeof foo8 +>foo8 : { (a2: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a2: any): any; } >a2 : any declare function foo10(a2: (...x: Base[]) => Base): typeof a2; ->foo10 : typeof foo10 +>foo10 : { (a2: (...x: Base[]) => Base): (...x: Base[]) => Base; (a2: any): any; } >a2 : (...x: Base[]) => Base >x : Base[] >Base : Base @@ -79,11 +79,11 @@ module Errors { >a2 : (...x: Base[]) => Base declare function foo10(a2: any): any; ->foo10 : typeof foo10 +>foo10 : { (a2: (...x: Base[]) => Base): (...x: Base[]) => Base; (a2: any): any; } >a2 : any declare function foo11(a2: (x: { foo: string }, y: { foo: string; bar: string }) => Base): typeof a2; ->foo11 : typeof foo11 +>foo11 : { (a2: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a2: any): any; } >a2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string @@ -94,11 +94,11 @@ module Errors { >a2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base declare function foo11(a2: any): any; ->foo11 : typeof foo11 +>foo11 : { (a2: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a2: any): any; } >a2 : any declare function foo12(a2: (x: Array, y: Array) => Array): typeof a2; ->foo12 : typeof foo12 +>foo12 : { (a2: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a2: any): any; } >a2 : (x: Base[], y: Derived2[]) => Derived[] >x : Base[] >Array : T[] @@ -111,11 +111,11 @@ module Errors { >a2 : (x: Base[], y: Derived2[]) => Derived[] declare function foo12(a2: any): any; ->foo12 : typeof foo12 +>foo12 : { (a2: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a2: any): any; } >a2 : any declare function foo15(a2: (x: { a: string; b: number }) => number): typeof a2; ->foo15 : typeof foo15 +>foo15 : { (a2: (x: { a: string; b: number; }) => number): (x: { a: string; b: number; }) => number; (a2: any): any; } >a2 : (x: { a: string; b: number; }) => number >x : { a: string; b: number; } >a : string @@ -123,11 +123,11 @@ module Errors { >a2 : (x: { a: string; b: number; }) => number declare function foo15(a2: any): any; ->foo15 : typeof foo15 +>foo15 : { (a2: (x: { a: string; b: number; }) => number): (x: { a: string; b: number; }) => number; (a2: any): any; } >a2 : any declare function foo16(a2: { ->foo16 : typeof foo16 +>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 @@ -155,11 +155,11 @@ module Errors { >a2 : { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; } declare function foo16(a2: any): any; ->foo16 : typeof foo16 +>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 : any declare function foo17(a2: { ->foo17 : typeof foo17 +>foo17 : { (a2: { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }): { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }; (a2: any): any; } >a2 : { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; } (x: { @@ -202,13 +202,13 @@ module Errors { >a2 : { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; } declare function foo17(a2: any): any; ->foo17 : typeof foo17 +>foo17 : { (a2: { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }): { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }; (a2: any): any; } >a2 : any var r1 = foo2((x: T) => null); // any >r1 : any >foo2((x: T) => null) : any ->foo2 : typeof foo2 +>foo2 : { (a2: (x: number) => string[]): (x: number) => string[]; (a2: any): any; } >(x: T) => null : (x: T) => U[] >T : T >U : U @@ -280,7 +280,7 @@ module Errors { var r2 = foo7(r2arg); // any >r2 : any >foo7(r2arg) : any ->foo7 : typeof foo7 +>foo7 : { (a2: (x: (arg: Base) => Derived) => (r: Base) => Derived2): (x: (arg: Base) => Derived) => (r: Base) => Derived2; (a2: any): any; } >r2arg : (x: (arg: T) => U) => (r: T) => V var r2a = [r2arg2, r2arg]; @@ -336,7 +336,7 @@ module Errors { var r3 = foo8(r3arg); // any >r3 : any >foo8(r3arg) : any ->foo8 : typeof foo8 +>foo8 : { (a2: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a2: any): any; } >r3arg : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U var r3a = [r3arg2, r3arg]; @@ -372,7 +372,7 @@ module Errors { var r4 = foo10(r4arg); // any >r4 : any >foo10(r4arg) : any ->foo10 : typeof foo10 +>foo10 : { (a2: (...x: Base[]) => Base): (...x: Base[]) => Base; (a2: any): any; } >r4arg : (...x: T[]) => T var r4a = [r4arg2, r4arg]; @@ -413,7 +413,7 @@ module Errors { var r5 = foo11(r5arg); // any >r5 : any >foo11(r5arg) : any ->foo11 : typeof foo11 +>foo11 : { (a2: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a2: any): any; } >r5arg : (x: T, y: T) => T var r5a = [r5arg2, r5arg]; @@ -459,7 +459,7 @@ module Errors { var r6 = foo12(r6arg); // (x: Array, y: Array) => Array >r6 : (x: Base[], y: Derived2[]) => Derived[] >foo12(r6arg) : (x: Base[], y: Derived2[]) => Derived[] ->foo12 : typeof foo12 +>foo12 : { (a2: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a2: any): any; } >r6arg : (x: Base[], y: Derived2[]) => Derived[] var r6a = [r6arg2, r6arg]; @@ -496,7 +496,7 @@ module Errors { var r7 = foo15(r7arg); // any >r7 : any >foo15(r7arg) : any ->foo15 : typeof foo15 +>foo15 : { (a2: (x: { a: string; b: number; }) => number): (x: { a: string; b: number; }) => number; (a2: any): any; } >r7arg : (x: { a: T; b: T; }) => T var r7a = [r7arg2, r7arg]; @@ -525,7 +525,7 @@ module Errors { var r7c = foo15(r7arg3); // (x: { a: string; b: number }) => number): number; >r7c : (x: { a: string; b: number; }) => number >foo15(r7arg3) : (x: { a: string; b: number; }) => number ->foo15 : typeof foo15 +>foo15 : { (a2: (x: { a: string; b: number; }) => number): (x: { a: string; b: number; }) => number; (a2: any): any; } >r7arg3 : (x: { a: T; b: T; }) => number var r7d = [r7arg2, r7arg3]; @@ -554,7 +554,7 @@ module Errors { var r8 = foo16(r8arg); // any >r8 : any >foo16(r8arg) : any ->foo16 : typeof foo16 +>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; } >r8arg : (x: (a: T) => T) => T[] var r9arg = (x: (a: T) => T) => null; @@ -570,7 +570,7 @@ module Errors { var r9 = foo17(r9arg); // (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; >r9 : { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; } >foo17(r9arg) : { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; } ->foo17 : typeof foo17 +>foo17 : { (a2: { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }): { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }; (a2: any): any; } >r9arg : (x: (a: T) => T) => any[] } @@ -578,7 +578,7 @@ module WithGenericSignaturesInBaseType { >WithGenericSignaturesInBaseType : typeof WithGenericSignaturesInBaseType declare function foo2(a2: (x: T) => T[]): typeof a2; ->foo2 : typeof foo2 +>foo2 : { (a2: (x: T) => T[]): (x: T) => T[]; (a2: any): any; } >a2 : (x: T) => T[] >T : T >x : T @@ -587,7 +587,7 @@ module WithGenericSignaturesInBaseType { >a2 : (x: T) => T[] declare function foo2(a2: any): any; ->foo2 : typeof foo2 +>foo2 : { (a2: (x: T) => T[]): (x: T) => T[]; (a2: any): any; } >a2 : any var r2arg2 = (x: T) => ['']; @@ -601,11 +601,11 @@ module WithGenericSignaturesInBaseType { var r2 = foo2(r2arg2); // (x:T) => T[] since we can infer from generic signatures now >r2 : (x: T) => T[] >foo2(r2arg2) : (x: T) => T[] ->foo2 : typeof foo2 +>foo2 : { (a2: (x: T) => T[]): (x: T) => T[]; (a2: any): any; } >r2arg2 : (x: T) => string[] declare function foo3(a2: (x: T) => string[]): typeof a2; ->foo3 : typeof foo3 +>foo3 : { (a2: (x: T) => string[]): (x: T) => string[]; (a2: any): any; } >a2 : (x: T) => string[] >T : T >x : T @@ -613,7 +613,7 @@ module WithGenericSignaturesInBaseType { >a2 : (x: T) => string[] declare function foo3(a2: any): any; ->foo3 : typeof foo3 +>foo3 : { (a2: (x: T) => string[]): (x: T) => string[]; (a2: any): any; } >a2 : any var r3arg2 = (x: T) => null; @@ -628,6 +628,6 @@ module WithGenericSignaturesInBaseType { var r3 = foo3(r3arg2); // any >r3 : any >foo3(r3arg2) : any ->foo3 : typeof foo3 +>foo3 : { (a2: (x: T) => string[]): (x: T) => string[]; (a2: any): any; } >r3arg2 : (x: T) => T[] } diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.types b/tests/baselines/reference/subtypingWithCallSignatures4.types index e570a89ab42..07b3af3e540 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.types +++ b/tests/baselines/reference/subtypingWithCallSignatures4.types @@ -21,7 +21,7 @@ class OtherDerived extends Base { bing: string; } >bing : string declare function foo1(a: (x: T) => T[]); ->foo1 : typeof foo1 +>foo1 : { (a: (x: T) => T[]): any; (a: any): any; } >a : (x: T) => T[] >T : T >x : T @@ -29,33 +29,33 @@ declare function foo1(a: (x: T) => T[]); >T : T declare function foo1(a: any): any; ->foo1 : typeof foo1 +>foo1 : { (a: (x: T) => T[]): any; (a: any): any; } >a : any declare function foo2(a2: (x: T) => string[]); ->foo2 : typeof foo2 +>foo2 : { (a2: (x: T) => string[]): any; (a: any): any; } >a2 : (x: T) => string[] >T : T >x : T >T : T declare function foo2(a: any): any; ->foo2 : typeof foo2 +>foo2 : { (a2: (x: T) => string[]): any; (a: any): any; } >a : any declare function foo3(a3: (x: T) => void); ->foo3 : typeof foo3 +>foo3 : { (a3: (x: T) => void): any; (a: any): any; } >a3 : (x: T) => void >T : T >x : T >T : T declare function foo3(a: any): any; ->foo3 : typeof foo3 +>foo3 : { (a3: (x: T) => void): any; (a: any): any; } >a : any declare function foo4(a4: (x: T, y: U) => string); ->foo4 : typeof foo4 +>foo4 : { (a4: (x: T, y: U) => string): any; (a: any): any; } >a4 : (x: T, y: U) => string >T : T >U : U @@ -65,11 +65,11 @@ declare function foo4(a4: (x: T, y: U) => string); >U : U declare function foo4(a: any): any; ->foo4 : typeof foo4 +>foo4 : { (a4: (x: T, y: U) => string): any; (a: any): any; } >a : any declare function foo5(a5: (x: (arg: T) => U) => T); ->foo5 : typeof foo5 +>foo5 : { (a5: (x: (arg: T) => U) => T): any; (a: any): any; } >a5 : (x: (arg: T) => U) => T >T : T >U : U @@ -80,11 +80,11 @@ declare function foo5(a5: (x: (arg: T) => U) => T); >T : T declare function foo5(a: any): any; ->foo5 : typeof foo5 +>foo5 : { (a5: (x: (arg: T) => U) => T): any; (a: any): any; } >a : any declare function foo6(a6: (x: (arg: T) => Derived) => T); ->foo6 : typeof foo6 +>foo6 : { (a6: (x: (arg: T) => Derived) => T): any; (a: any): any; } >a6 : (x: (arg: T) => Derived) => T >T : T >Base : Base @@ -95,11 +95,11 @@ declare function foo6(a6: (x: (arg: T) => Derived) => T); >T : T declare function foo6(a: any): any; ->foo6 : typeof foo6 +>foo6 : { (a6: (x: (arg: T) => Derived) => T): any; (a: any): any; } >a : any declare function foo11(a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base); ->foo11 : typeof foo11 +>foo11 : { (a11: (x: { foo: T; }, y: { foo: T; bar: T; }) => Base): any; (a: any): any; } >a11 : (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >T : T >x : { foo: T; } @@ -113,11 +113,11 @@ declare function foo11(a11: (x: { foo: T }, y: { foo: T; bar: T }) => Base); >Base : Base declare function foo11(a: any): any; ->foo11 : typeof foo11 +>foo11 : { (a11: (x: { foo: T; }, y: { foo: T; bar: T; }) => Base): any; (a: any): any; } >a : any declare function foo15(a15: (x: { a: T; b: T }) => T[]); ->foo15 : typeof foo15 +>foo15 : { (a15: (x: { a: T; b: T; }) => T[]): any; (a: any): any; } >a15 : (x: { a: T; b: T; }) => T[] >T : T >x : { a: T; b: T; } @@ -128,11 +128,11 @@ declare function foo15(a15: (x: { a: T; b: T }) => T[]); >T : T declare function foo15(a: any): any; ->foo15 : typeof foo15 +>foo15 : { (a15: (x: { a: T; b: T; }) => T[]): any; (a: any): any; } >a : any declare function foo16(a16: (x: { a: T; b: T }) => T[]); ->foo16 : typeof foo16 +>foo16 : { (a16: (x: { a: T; b: T; }) => T[]): any; (a: any): any; } >a16 : (x: { a: T; b: T; }) => T[] >T : T >Base : Base @@ -144,11 +144,11 @@ declare function foo16(a16: (x: { a: T; b: T }) => T[]); >T : T declare function foo16(a: any): any; ->foo16 : typeof foo16 +>foo16 : { (a16: (x: { a: T; b: T; }) => T[]): any; (a: any): any; } >a : any declare function foo17(a17: { ->foo17 : typeof foo17 +>foo17 : { (a17: { (x: (a: T) => T): T[]; (x: (a: T) => T): T[]; }): any; (a: any): any; } >a17 : { (x: (a: T) => T): T[]; (x: (a: T) => T): T[]; } (x: (a: T) => T): T[]; @@ -171,11 +171,11 @@ declare function foo17(a17: { }); declare function foo17(a: any): any; ->foo17 : typeof foo17 +>foo17 : { (a17: { (x: (a: T) => T): T[]; (x: (a: T) => T): T[]; }): any; (a: any): any; } >a : any declare function foo18(a18: { ->foo18 : typeof foo18 +>foo18 : { (a18: { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }): any; (a: any): any; } >a18 : { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; } (x: { @@ -216,7 +216,7 @@ declare function foo18(a18: { }): any[]; }); declare function foo18(a: any): any; ->foo18 : typeof foo18 +>foo18 : { (a18: { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }): any; (a: any): any; } >a : any var r1arg = (x: T) => null; @@ -240,7 +240,7 @@ var r1arg2 = (x: T) => null; var r1 = foo1(r1arg); >r1 : any >foo1(r1arg) : any ->foo1 : typeof foo1 +>foo1 : { (a: (x: T) => T[]): any; (a: any): any; } >r1arg : (x: T) => T[] var r1a = [r1arg, r1arg2]; @@ -274,7 +274,7 @@ var r2arg2 = (x: T) => ['']; var r2 = foo2(r2arg); >r2 : any >foo2(r2arg) : any ->foo2 : typeof foo2 +>foo2 : { (a2: (x: T) => string[]): any; (a: any): any; } >r2arg : (x: T) => string[] var r2a = [r2arg, r2arg2]; @@ -308,7 +308,7 @@ var r3arg2 = (x: T) => { }; var r3 = foo3(r3arg); >r3 : any >foo3(r3arg) : any ->foo3 : typeof foo3 +>foo3 : { (a3: (x: T) => void): any; (a: any): any; } >r3arg : (x: T) => T var r3a = [r3arg, r3arg2]; @@ -346,7 +346,7 @@ var r4arg2 = (x: T, y: U) => ''; var r4 = foo4(r4arg); >r4 : any >foo4(r4arg) : any ->foo4 : typeof foo4 +>foo4 : { (a4: (x: T, y: U) => string): any; (a: any): any; } >r4arg : (x: T, y: U) => string var r4a = [r4arg, r4arg2]; @@ -388,7 +388,7 @@ var r5arg2 = (x: (arg: T) => U) => null; var r5 = foo5(r5arg); >r5 : any >foo5(r5arg) : any ->foo5 : typeof foo5 +>foo5 : { (a5: (x: (arg: T) => U) => T): any; (a: any): any; } >r5arg : (x: (arg: T) => U) => T var r5a = [r5arg, r5arg2]; @@ -432,7 +432,7 @@ var r6arg2 = (x: (arg: T) => Derived) => null; var r6 = foo6(r6arg); >r6 : any >foo6(r6arg) : any ->foo6 : typeof foo6 +>foo6 : { (a6: (x: (arg: T) => Derived) => T): any; (a: any): any; } >r6arg : (x: (arg: T) => U) => T var r6a = [r6arg, r6arg2]; @@ -481,7 +481,7 @@ var r11arg2 = (x: { foo: T }, y: { foo: T; bar: T }) => null; var r11 = foo11(r11arg); >r11 : any >foo11(r11arg) : any ->foo11 : typeof foo11 +>foo11 : { (a11: (x: { foo: T; }, y: { foo: T; bar: T; }) => Base): any; (a: any): any; } >r11arg : (x: { foo: T; }, y: { foo: U; bar: U; }) => Base var r11a = [r11arg, r11arg2]; @@ -524,7 +524,7 @@ var r15arg2 = (x: { a: T; b: T }) => null; var r15 = foo15(r15arg); >r15 : any >foo15(r15arg) : any ->foo15 : typeof foo15 +>foo15 : { (a15: (x: { a: T; b: T; }) => T[]): any; (a: any): any; } >r15arg : (x: { a: U; b: V; }) => U[] var r15a = [r15arg, r15arg2]; @@ -568,7 +568,7 @@ var r16arg2 = (x: { a: T; b: T }) => null; var r16 = foo16(r16arg); >r16 : any >foo16(r16arg) : any ->foo16 : typeof foo16 +>foo16 : { (a16: (x: { a: T; b: T; }) => T[]): any; (a: any): any; } >r16arg : (x: { a: T; b: T; }) => T[] var r16a = [r16arg, r16arg2]; @@ -597,7 +597,7 @@ var r17arg = (x: (a: T) => T) => null; var r17 = foo17(r17arg); >r17 : any >foo17(r17arg) : any ->foo17 : typeof foo17 +>foo17 : { (a17: { (x: (a: T) => T): T[]; (x: (a: T) => T): T[]; }): any; (a: any): any; } >r17arg : (x: (a: T) => T) => T[] var r18arg = (x: (a: T) => T) => null; @@ -613,6 +613,6 @@ var r18arg = (x: (a: T) => T) => null; var r18 = foo18(r18arg); >r18 : any >foo18(r18arg) : any ->foo18 : typeof foo18 +>foo18 : { (a18: { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }): any; (a: any): any; } >r18arg : (x: (a: T) => T) => any[] diff --git a/tests/baselines/reference/subtypingWithConstructSignatures.types b/tests/baselines/reference/subtypingWithConstructSignatures.types index ed6ebc18c56..71ee7384f25 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures.types @@ -3,13 +3,13 @@ module ConstructSignature { >ConstructSignature : typeof ConstructSignature declare function foo1(cb: new (x: number) => void): typeof cb; ->foo1 : typeof foo1 +>foo1 : { (cb: new (x: number) => void): new (x: number) => void; (cb: any): any; } >cb : new (x: number) => void >x : number >cb : new (x: number) => void declare function foo1(cb: any): any; ->foo1 : typeof foo1 +>foo1 : { (cb: new (x: number) => void): new (x: number) => void; (cb: any): any; } >cb : any var rarg1: new (x: number) => number; @@ -19,7 +19,7 @@ module ConstructSignature { var r = foo1(rarg1); // ok because base returns void >r : new (x: number) => void >foo1(rarg1) : new (x: number) => void ->foo1 : typeof foo1 +>foo1 : { (cb: new (x: number) => void): new (x: number) => void; (cb: any): any; } >rarg1 : new (x: number) => number var rarg2: new (x: T) => string; @@ -31,18 +31,18 @@ module ConstructSignature { var r2 = foo1(rarg2); // ok because base returns void >r2 : new (x: number) => void >foo1(rarg2) : new (x: number) => void ->foo1 : typeof foo1 +>foo1 : { (cb: new (x: number) => void): new (x: number) => void; (cb: any): any; } >rarg2 : new (x: T) => string declare function foo2(cb: new (x: number, y: number) => void): typeof cb; ->foo2 : typeof foo2 +>foo2 : { (cb: new (x: number, y: number) => void): new (x: number, y: number) => void; (cb: any): any; } >cb : new (x: number, y: number) => void >x : number >y : number >cb : new (x: number, y: number) => void declare function foo2(cb: any): any; ->foo2 : typeof foo2 +>foo2 : { (cb: new (x: number, y: number) => void): new (x: number, y: number) => void; (cb: any): any; } >cb : any var r3arg1: new (x: number, y: number) => number; @@ -53,7 +53,7 @@ module ConstructSignature { var r3 = foo2(r3arg1); // ok because base returns void >r3 : new (x: number, y: number) => void >foo2(r3arg1) : new (x: number, y: number) => void ->foo2 : typeof foo2 +>foo2 : { (cb: new (x: number, y: number) => void): new (x: number, y: number) => void; (cb: any): any; } >r3arg1 : new (x: number, y: number) => number var r4arg1: new (x: T) => string; @@ -65,6 +65,6 @@ module ConstructSignature { var r4 = foo2(r4arg1); // ok because base returns void >r4 : new (x: number, y: number) => void >foo2(r4arg1) : new (x: number, y: number) => void ->foo2 : typeof foo2 +>foo2 : { (cb: new (x: number, y: number) => void): new (x: number, y: number) => void; (cb: any): any; } >r4arg1 : new (x: T) => string } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.types b/tests/baselines/reference/subtypingWithConstructSignatures2.types index 75859e04902..fdba6014751 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.types @@ -21,59 +21,59 @@ class OtherDerived extends Base { bing: string; } >bing : string declare function foo1(a: new (x: number) => number[]): typeof a; ->foo1 : typeof foo1 +>foo1 : { (a: new (x: number) => number[]): new (x: number) => number[]; (a: any): any; } >a : new (x: number) => number[] >x : number >a : new (x: number) => number[] declare function foo1(a: any): any; ->foo1 : typeof foo1 +>foo1 : { (a: new (x: number) => number[]): new (x: number) => number[]; (a: any): any; } >a : any declare function foo2(a: new (x: number) => string[]): typeof a; ->foo2 : typeof foo2 +>foo2 : { (a: new (x: number) => string[]): new (x: number) => string[]; (a: any): any; } >a : new (x: number) => string[] >x : number >a : new (x: number) => string[] declare function foo2(a: any): any; ->foo2 : typeof foo2 +>foo2 : { (a: new (x: number) => string[]): new (x: number) => string[]; (a: any): any; } >a : any declare function foo3(a: new (x: number) => void): typeof a; ->foo3 : typeof foo3 +>foo3 : { (a: new (x: number) => void): new (x: number) => void; (a: any): any; } >a : new (x: number) => void >x : number >a : new (x: number) => void declare function foo3(a: any): any; ->foo3 : typeof foo3 +>foo3 : { (a: new (x: number) => void): new (x: number) => void; (a: any): any; } >a : any declare function foo4(a: new (x: string, y: number) => string): typeof a; ->foo4 : typeof foo4 +>foo4 : { (a: new (x: string, y: number) => string): new (x: string, y: number) => string; (a: any): any; } >a : new (x: string, y: number) => string >x : string >y : number >a : new (x: string, y: number) => string declare function foo4(a: any): any; ->foo4 : typeof foo4 +>foo4 : { (a: new (x: string, y: number) => string): new (x: string, y: number) => string; (a: any): any; } >a : any declare function foo5(a: new (x: new (arg: string) => number) => string): typeof a; ->foo5 : typeof foo5 +>foo5 : { (a: new (x: new (arg: string) => number) => string): new (x: new (arg: string) => number) => string; (a: any): any; } >a : new (x: new (arg: string) => number) => string >x : new (arg: string) => number >arg : string >a : new (x: new (arg: string) => number) => string declare function foo5(a: any): any; ->foo5 : typeof foo5 +>foo5 : { (a: new (x: new (arg: string) => number) => string): new (x: new (arg: string) => number) => string; (a: any): any; } >a : any declare function foo6(a: new (x: new (arg: Base) => Derived) => Base): typeof a; ->foo6 : typeof foo6 +>foo6 : { (a: new (x: new (arg: Base) => Derived) => Base): new (x: new (arg: Base) => Derived) => Base; (a: any): any; } >a : new (x: new (arg: Base) => Derived) => Base >x : new (arg: Base) => Derived >arg : Base @@ -83,11 +83,11 @@ declare function foo6(a: new (x: new (arg: Base) => Derived) => Base): typeof a; >a : new (x: new (arg: Base) => Derived) => Base declare function foo6(a: any): any; ->foo6 : typeof foo6 +>foo6 : { (a: new (x: new (arg: Base) => Derived) => Base): new (x: new (arg: Base) => Derived) => Base; (a: any): any; } >a : any declare function foo7(a: new (x: new (arg: Base) => Derived) => new (r: Base) => Derived): typeof a; ->foo7 : typeof foo7 +>foo7 : { (a: new (x: new (arg: Base) => Derived) => new (r: Base) => Derived): new (x: new (arg: Base) => Derived) => new (r: Base) => Derived; (a: any): any; } >a : new (x: new (arg: Base) => Derived) => new (r: Base) => Derived >x : new (arg: Base) => Derived >arg : Base @@ -99,11 +99,11 @@ declare function foo7(a: new (x: new (arg: Base) => Derived) => new (r: Base) => >a : new (x: new (arg: Base) => Derived) => new (r: Base) => Derived declare function foo7(a: any): any; ->foo7 : typeof foo7 +>foo7 : { (a: new (x: new (arg: Base) => Derived) => new (r: Base) => Derived): new (x: new (arg: Base) => Derived) => new (r: Base) => Derived; (a: any): any; } >a : any declare function foo8(a: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived): typeof a; ->foo8 : typeof foo8 +>foo8 : { (a: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived): new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived; (a: any): any; } >a : new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived >x : new (arg: Base) => Derived >arg : Base @@ -119,11 +119,11 @@ declare function foo8(a: new (x: new (arg: Base) => Derived, y: new (arg2: Base) >a : new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived declare function foo8(a: any): any; ->foo8 : typeof foo8 +>foo8 : { (a: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived): new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived; (a: any): any; } >a : any declare function foo9(a: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived): typeof a; ->foo9 : typeof foo9 +>foo9 : { (a: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived): new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived; (a: any): any; } >a : new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived >x : new (arg: Base) => Derived >arg : Base @@ -139,11 +139,11 @@ declare function foo9(a: new (x: new (arg: Base) => Derived, y: new (arg2: Base) >a : new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived declare function foo9(a: any): any; ->foo9 : typeof foo9 +>foo9 : { (a: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived): new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived; (a: any): any; } >a : any declare function foo10(a: new (...x: Derived[]) => Derived): typeof a; ->foo10 : typeof foo10 +>foo10 : { (a: new (...x: Derived[]) => Derived): new (...x: Derived[]) => Derived; (a: any): any; } >a : new (...x: Derived[]) => Derived >x : Derived[] >Derived : Derived @@ -151,11 +151,11 @@ declare function foo10(a: new (...x: Derived[]) => Derived): typeof a; >a : new (...x: Derived[]) => Derived declare function foo10(a: any): any; ->foo10 : typeof foo10 +>foo10 : { (a: new (...x: Derived[]) => Derived): new (...x: Derived[]) => Derived; (a: any): any; } >a : any declare function foo11(a: new (x: { foo: string }, y: { foo: string; bar: string }) => Base): typeof a; ->foo11 : typeof foo11 +>foo11 : { (a: new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a: any): any; } >a : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string @@ -166,11 +166,11 @@ declare function foo11(a: new (x: { foo: string }, y: { foo: string; bar: string >a : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base declare function foo11(a: any): any; ->foo11 : typeof foo11 +>foo11 : { (a: new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a: any): any; } >a : any declare function foo12(a: new (x: Array, y: Array) => Array): typeof a; ->foo12 : typeof foo12 +>foo12 : { (a: new (x: Base[], y: Derived2[]) => Derived[]): new (x: Base[], y: Derived2[]) => Derived[]; (a: any): any; } >a : new (x: Base[], y: Derived2[]) => Derived[] >x : Base[] >Array : T[] @@ -183,11 +183,11 @@ declare function foo12(a: new (x: Array, y: Array) => Arraya : new (x: Base[], y: Derived2[]) => Derived[] declare function foo12(a: any): any; ->foo12 : typeof foo12 +>foo12 : { (a: new (x: Base[], y: Derived2[]) => Derived[]): new (x: Base[], y: Derived2[]) => Derived[]; (a: any): any; } >a : any declare function foo13(a: new (x: Array, y: Array) => Array): typeof a; ->foo13 : typeof foo13 +>foo13 : { (a: new (x: Base[], y: Derived[]) => Derived[]): new (x: Base[], y: Derived[]) => Derived[]; (a: any): any; } >a : new (x: Base[], y: Derived[]) => Derived[] >x : Base[] >Array : T[] @@ -200,11 +200,11 @@ declare function foo13(a: new (x: Array, y: Array) => Arraya : new (x: Base[], y: Derived[]) => Derived[] declare function foo13(a: any): any; ->foo13 : typeof foo13 +>foo13 : { (a: new (x: Base[], y: Derived[]) => Derived[]): new (x: Base[], y: Derived[]) => Derived[]; (a: any): any; } >a : any declare function foo14(a: new (x: { a: string; b: number }) => Object): typeof a; ->foo14 : typeof foo14 +>foo14 : { (a: new (x: { a: string; b: number; }) => Object): new (x: { a: string; b: number; }) => Object; (a: any): any; } >a : new (x: { a: string; b: number; }) => Object >x : { a: string; b: number; } >a : string @@ -213,11 +213,11 @@ declare function foo14(a: new (x: { a: string; b: number }) => Object): typeof a >a : new (x: { a: string; b: number; }) => Object declare function foo14(a: any): any; ->foo14 : typeof foo14 +>foo14 : { (a: new (x: { a: string; b: number; }) => Object): new (x: { a: string; b: number; }) => Object; (a: any): any; } >a : any declare function foo15(a: { ->foo15 : typeof foo15 +>foo15 : { (a: { new (x: number): number[]; new (x: string): string[]; }): { new (x: number): number[]; new (x: string): string[]; }; (a: any): any; } >a : { new (x: number): number[]; new (x: string): string[]; } new (x: number): number[]; @@ -230,11 +230,11 @@ declare function foo15(a: { >a : { new (x: number): number[]; new (x: string): string[]; } declare function foo15(a: any): any; ->foo15 : typeof foo15 +>foo15 : { (a: { new (x: number): number[]; new (x: string): string[]; }): { new (x: number): number[]; new (x: string): string[]; }; (a: any): any; } >a : any declare function foo16(a: { ->foo16 : typeof foo16 +>foo16 : { (a: { new (x: T): number[]; new (x: U): number[]; }): { new (x: T): number[]; new (x: U): number[]; }; (a: any): any; } >a : { new (x: T): number[]; new (x: U): number[]; } new (x: T): number[]; @@ -253,11 +253,11 @@ declare function foo16(a: { >a : { new (x: T): number[]; new (x: U): number[]; } declare function foo16(a: any): any; ->foo16 : typeof foo16 +>foo16 : { (a: { new (x: T): number[]; new (x: U): number[]; }): { new (x: T): number[]; new (x: U): number[]; }; (a: any): any; } >a : any declare function foo17(a: { ->foo17 : typeof foo17 +>foo17 : { (a: { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[]; }): { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[]; }; (a: any): any; } >a : { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[]; } new (x: (a: number) => number): number[]; @@ -272,11 +272,11 @@ declare function foo17(a: { >a : { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[]; } declare function foo17(a: any): any; ->foo17 : typeof foo17 +>foo17 : { (a: { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[]; }): { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[]; }; (a: any): any; } >a : any declare function foo18(a: { ->foo18 : typeof foo18 +>foo18 : { (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: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; }; (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: { @@ -305,7 +305,7 @@ declare function foo18(a: { >a : { new (x: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; } declare function foo18(a: any): any; ->foo18 : typeof foo18 +>foo18 : { (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: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; }; (a: any): any; } >a : any var r1arg1: new (x: T) => T[]; @@ -322,7 +322,7 @@ var r1arg2: new (x: number) => number[]; var r1 = foo1(r1arg1); // any, return types are not subtype of first overload >r1 : any >foo1(r1arg1) : any ->foo1 : typeof foo1 +>foo1 : { (a: new (x: number) => number[]): new (x: number) => number[]; (a: any): any; } >r1arg1 : new (x: T) => T[] var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions @@ -350,7 +350,7 @@ var r2arg2: new (x: number) => string[]; var r2 = foo2(r2arg1); >r2 : new (x: number) => string[] >foo2(r2arg1) : new (x: number) => string[] ->foo2 : typeof foo2 +>foo2 : { (a: new (x: number) => string[]): new (x: number) => string[]; (a: any): any; } >r2arg1 : new (x: T) => string[] var r2a = [r2arg1, r2arg2]; @@ -379,7 +379,7 @@ var r3arg2: new (x: number) => void; var r3 = foo3(r3arg1); >r3 : new (x: number) => void >foo3(r3arg1) : new (x: number) => void ->foo3 : typeof foo3 +>foo3 : { (a: new (x: number) => void): new (x: number) => void; (a: any): any; } >r3arg1 : new (x: T) => T var r3a = [r3arg1, r3arg2]; @@ -412,7 +412,7 @@ var r4arg2: new (x: string, y: number) => string; var r4 = foo4(r4arg1); // any >r4 : any >foo4(r4arg1) : any ->foo4 : typeof foo4 +>foo4 : { (a: new (x: string, y: number) => string): new (x: string, y: number) => string; (a: any): any; } >r4arg1 : new (x: T, y: U) => T var r4a = [r4arg1, r4arg2]; @@ -445,7 +445,7 @@ var r5arg2: new (x: new (arg: string) => number) => string; var r5 = foo5(r5arg1); // any >r5 : any >foo5(r5arg1) : any ->foo5 : typeof foo5 +>foo5 : { (a: new (x: new (arg: string) => number) => string): new (x: new (arg: string) => number) => string; (a: any): any; } >r5arg1 : new (x: new (arg: T) => U) => T var r5a = [r5arg1, r5arg2]; @@ -483,7 +483,7 @@ var r6arg2: new (x: new (arg: Base) => Derived) => Base; var r6 = foo6(r6arg1); // any >r6 : any >foo6(r6arg1) : any ->foo6 : typeof foo6 +>foo6 : { (a: new (x: new (arg: Base) => Derived) => Base): new (x: new (arg: Base) => Derived) => Base; (a: any): any; } >r6arg1 : new (x: new (arg: T) => U) => T var r6a = [r6arg1, r6arg2]; @@ -525,7 +525,7 @@ var r7arg2: new (x: new (arg: Base) => Derived) => new (r: Base) => Derived; var r7 = foo7(r7arg1); // any >r7 : any >foo7(r7arg1) : any ->foo7 : typeof foo7 +>foo7 : { (a: new (x: new (arg: Base) => Derived) => new (r: Base) => Derived): new (x: new (arg: Base) => Derived) => new (r: Base) => Derived; (a: any): any; } >r7arg1 : new (x: new (arg: T) => U) => new (r: T) => U var r7a = [r7arg1, r7arg2]; @@ -575,7 +575,7 @@ var r8arg2: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) var r8 = foo8(r8arg1); // any >r8 : any >foo8(r8arg1) : any ->foo8 : typeof foo8 +>foo8 : { (a: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived): new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived; (a: any): any; } >r8arg1 : new (x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U var r8a = [r8arg1, r8arg2]; @@ -626,7 +626,7 @@ var r9arg2: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) var r9 = foo9(r9arg1); // any >r9 : any >foo9(r9arg1) : any ->foo9 : typeof foo9 +>foo9 : { (a: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived): new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived; (a: any): any; } >r9arg1 : new (x: new (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => new (r: T) => U var r9a = [r9arg1, r9arg2]; @@ -658,7 +658,7 @@ var r10arg2: new (...x: Derived[]) => Derived; var r10 = foo10(r10arg1); // any >r10 : any >foo10(r10arg1) : any ->foo10 : typeof foo10 +>foo10 : { (a: new (...x: Derived[]) => Derived): new (...x: Derived[]) => Derived; (a: any): any; } >r10arg1 : new (...x: T[]) => T var r10a = [r10arg1, r10arg2]; @@ -695,7 +695,7 @@ var r11arg2: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; var r11 = foo11(r11arg1); // any >r11 : any >foo11(r11arg1) : any ->foo11 : typeof foo11 +>foo11 : { (a: new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a: any): any; } >r11arg1 : new (x: T, y: T) => T var r11a = [r11arg1, r11arg2]; @@ -737,7 +737,7 @@ var r12arg2: new (x: Array, y: Array) => Array; var r12 = foo12(r12arg1); // any >r12 : new (x: Base[], y: Derived2[]) => Derived[] >foo12(r12arg1) : new (x: Base[], y: Derived2[]) => Derived[] ->foo12 : typeof foo12 +>foo12 : { (a: new (x: Base[], y: Derived2[]) => Derived[]): new (x: Base[], y: Derived2[]) => Derived[]; (a: any): any; } >r12arg1 : new (x: Base[], y: T) => Derived[] var r12a = [r12arg1, r12arg2]; @@ -778,7 +778,7 @@ var r13arg2: new (x: Array, y: Array) => Array; var r13 = foo13(r13arg1); // any >r13 : any >foo13(r13arg1) : any ->foo13 : typeof foo13 +>foo13 : { (a: new (x: Base[], y: Derived[]) => Derived[]): new (x: Base[], y: Derived[]) => Derived[]; (a: any): any; } >r13arg1 : new (x: Base[], y: T) => T var r13a = [r13arg1, r13arg2]; @@ -813,7 +813,7 @@ var r14arg2: new (x: { a: string; b: number }) => Object; var r14 = foo14(r14arg1); // any >r14 : any >foo14(r14arg1) : any ->foo14 : typeof foo14 +>foo14 : { (a: new (x: { a: string; b: number; }) => Object): new (x: { a: string; b: number; }) => Object; (a: any): any; } >r14arg1 : new (x: { a: T; b: T; }) => T var r14a = [r14arg1, r14arg2]; @@ -838,7 +838,7 @@ var r15arg1: new (x: T) => T[]; var r15 = foo15(r15arg1); // any >r15 : any >foo15(r15arg1) : any ->foo15 : typeof foo15 +>foo15 : { (a: { new (x: number): number[]; new (x: string): string[]; }): { new (x: number): number[]; new (x: string): string[]; }; (a: any): any; } >r15arg1 : new (x: T) => T[] var r16arg1: new (x: T) => number[]; @@ -851,7 +851,7 @@ var r16arg1: new (x: T) => number[]; var r16 = foo16(r16arg1); >r16 : { new (x: T): number[]; new (x: U): number[]; } >foo16(r16arg1) : { new (x: T): number[]; new (x: U): number[]; } ->foo16 : typeof foo16 +>foo16 : { (a: { new (x: T): number[]; new (x: U): number[]; }): { new (x: T): number[]; new (x: U): number[]; }; (a: any): any; } >r16arg1 : new (x: T) => number[] var r17arg1: new (x: (a: T) => T) => T[]; @@ -866,7 +866,7 @@ var r17arg1: new (x: (a: T) => T) => T[]; var r17 = foo17(r17arg1); // any >r17 : any >foo17(r17arg1) : any ->foo17 : typeof foo17 +>foo17 : { (a: { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[]; }): { new (x: (a: number) => number): number[]; new (x: (a: string) => string): string[]; }; (a: any): any; } >r17arg1 : new (x: (a: T) => T) => T[] var r18arg1: new (x: (a: T) => T) => T[]; @@ -881,6 +881,6 @@ var r18arg1: new (x: (a: T) => T) => T[]; var r18 = foo18(r18arg1); >r18 : any >foo18(r18arg1) : any ->foo18 : typeof foo18 +>foo18 : { (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: { new (a: number): number; new (a: string): string; }): any[]; new (x: { new (a: boolean): boolean; new (a: Date): Date; }): any[]; }; (a: any): any; } >r18arg1 : new (x: (a: T) => T) => T[] diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.types b/tests/baselines/reference/subtypingWithConstructSignatures3.types index 5d33a2149d6..cf4db8939fd 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.types @@ -25,17 +25,17 @@ module Errors { >bing : string declare function foo2(a2: new (x: number) => string[]): typeof a2; ->foo2 : typeof foo2 +>foo2 : { (a2: new (x: number) => string[]): new (x: number) => string[]; (a2: any): any; } >a2 : new (x: number) => string[] >x : number >a2 : new (x: number) => string[] declare function foo2(a2: any): any; ->foo2 : typeof foo2 +>foo2 : { (a2: new (x: number) => string[]): new (x: number) => string[]; (a2: any): any; } >a2 : any declare function foo7(a2: new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2): typeof a2; ->foo7 : typeof foo7 +>foo7 : { (a2: new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2): new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2; (a2: any): any; } >a2 : new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2 >x : new (arg: Base) => Derived >arg : Base @@ -47,11 +47,11 @@ module Errors { >a2 : new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2 declare function foo7(a2: any): any; ->foo7 : typeof foo7 +>foo7 : { (a2: new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2): new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2; (a2: any): any; } >a2 : any declare function foo8(a2: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived): typeof a2; ->foo8 : typeof foo8 +>foo8 : { (a2: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived): new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived; (a2: any): any; } >a2 : new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived >x : new (arg: Base) => Derived >arg : Base @@ -67,11 +67,11 @@ module Errors { >a2 : new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived declare function foo8(a2: any): any; ->foo8 : typeof foo8 +>foo8 : { (a2: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived): new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived; (a2: any): any; } >a2 : any declare function foo10(a2: new (...x: Base[]) => Base): typeof a2; ->foo10 : typeof foo10 +>foo10 : { (a2: new (...x: Base[]) => Base): new (...x: Base[]) => Base; (a2: any): any; } >a2 : new (...x: Base[]) => Base >x : Base[] >Base : Base @@ -79,11 +79,11 @@ module Errors { >a2 : new (...x: Base[]) => Base declare function foo10(a2: any): any; ->foo10 : typeof foo10 +>foo10 : { (a2: new (...x: Base[]) => Base): new (...x: Base[]) => Base; (a2: any): any; } >a2 : any declare function foo11(a2: new (x: { foo: string }, y: { foo: string; bar: string }) => Base): typeof a2; ->foo11 : typeof foo11 +>foo11 : { (a2: new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a2: any): any; } >a2 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base >x : { foo: string; } >foo : string @@ -94,11 +94,11 @@ module Errors { >a2 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base declare function foo11(a2: any): any; ->foo11 : typeof foo11 +>foo11 : { (a2: new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a2: any): any; } >a2 : any declare function foo12(a2: new (x: Array, y: Array) => Array): typeof a2; ->foo12 : typeof foo12 +>foo12 : { (a2: new (x: Base[], y: Derived2[]) => Derived[]): new (x: Base[], y: Derived2[]) => Derived[]; (a2: any): any; } >a2 : new (x: Base[], y: Derived2[]) => Derived[] >x : Base[] >Array : T[] @@ -111,11 +111,11 @@ module Errors { >a2 : new (x: Base[], y: Derived2[]) => Derived[] declare function foo12(a2: any): any; ->foo12 : typeof foo12 +>foo12 : { (a2: new (x: Base[], y: Derived2[]) => Derived[]): new (x: Base[], y: Derived2[]) => Derived[]; (a2: any): any; } >a2 : any declare function foo15(a2: new (x: { a: string; b: number }) => number): typeof a2; ->foo15 : typeof foo15 +>foo15 : { (a2: new (x: { a: string; b: number; }) => number): new (x: { a: string; b: number; }) => number; (a2: any): any; } >a2 : new (x: { a: string; b: number; }) => number >x : { a: string; b: number; } >a : string @@ -123,11 +123,11 @@ module Errors { >a2 : new (x: { a: string; b: number; }) => number declare function foo15(a2: any): any; ->foo15 : typeof foo15 +>foo15 : { (a2: new (x: { a: string; b: number; }) => number): new (x: { a: string; b: number; }) => number; (a2: any): any; } >a2 : any declare function foo16(a2: { ->foo16 : typeof foo16 +>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 @@ -155,11 +155,11 @@ module Errors { >a2 : { new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; } declare function foo16(a2: any): any; ->foo16 : typeof foo16 +>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 : any declare function foo17(a2: { ->foo17 : typeof foo17 +>foo17 : { (a2: { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }): { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }; (a2: any): any; } >a2 : { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; } new (x: { @@ -202,7 +202,7 @@ module Errors { >a2 : { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; } declare function foo17(a2: any): any; ->foo17 : typeof foo17 +>foo17 : { (a2: { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }): { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }; (a2: any): any; } >a2 : any var r1arg1: new (x: T) => U[]; @@ -220,7 +220,7 @@ module Errors { var r1 = foo2(r1arg1); // any >r1 : any >foo2(r1arg1) : any ->foo2 : typeof foo2 +>foo2 : { (a2: new (x: number) => string[]): new (x: number) => string[]; (a2: any): any; } >r1arg1 : new (x: T) => U[] var r1a = [r1arg2, r1arg1]; @@ -264,7 +264,7 @@ module Errors { var r2 = foo7(r2arg1); // any >r2 : any >foo7(r2arg1) : any ->foo7 : typeof foo7 +>foo7 : { (a2: new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2): new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2; (a2: any): any; } >r2arg1 : new (x: new (arg: T) => U) => new (r: T) => V var r2a = [r2arg2, r2arg1]; @@ -314,7 +314,7 @@ module Errors { var r3 = foo8(r3arg1); // any >r3 : any >foo8(r3arg1) : any ->foo8 : typeof foo8 +>foo8 : { (a2: new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived): new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived; (a2: any): any; } >r3arg1 : new (x: new (arg: T) => U, y: (arg2: { foo: number; }) => U) => new (r: T) => U var r3a = [r3arg2, r3arg1]; @@ -346,7 +346,7 @@ module Errors { var r4 = foo10(r4arg1); // any >r4 : any >foo10(r4arg1) : any ->foo10 : typeof foo10 +>foo10 : { (a2: new (...x: Base[]) => Base): new (...x: Base[]) => Base; (a2: any): any; } >r4arg1 : new (...x: T[]) => T var r4a = [r4arg2, r4arg1]; @@ -383,7 +383,7 @@ module Errors { var r5 = foo11(r5arg1); // any >r5 : any >foo11(r5arg1) : any ->foo11 : typeof foo11 +>foo11 : { (a2: new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a2: any): any; } >r5arg1 : new (x: T, y: T) => T var r5a = [r5arg2, r5arg1]; @@ -425,7 +425,7 @@ module Errors { var r6 = foo12(r6arg1); // new (x: Array, y: Array) => Array >r6 : new (x: Base[], y: Derived2[]) => Derived[] >foo12(r6arg1) : new (x: Base[], y: Derived2[]) => Derived[] ->foo12 : typeof foo12 +>foo12 : { (a2: new (x: Base[], y: Derived2[]) => Derived[]): new (x: Base[], y: Derived2[]) => Derived[]; (a2: any): any; } >r6arg1 : new (x: Base[], y: Derived2[]) => Derived[] var r6a = [r6arg2, r6arg1]; @@ -459,7 +459,7 @@ module Errors { var r7 = foo15(r7arg1); // (x: { a: string; b: number }) => number): number; >r7 : any >foo15(r7arg1) : any ->foo15 : typeof foo15 +>foo15 : { (a2: new (x: { a: string; b: number; }) => number): new (x: { a: string; b: number; }) => number; (a2: any): any; } >r7arg1 : new (x: { a: T; b: T; }) => T var r7a = [r7arg2, r7arg1]; @@ -487,7 +487,7 @@ module Errors { var r7c = foo15(r7arg3); // any >r7c : new (x: { a: string; b: number; }) => number >foo15(r7arg3) : new (x: { a: string; b: number; }) => number ->foo15 : typeof foo15 +>foo15 : { (a2: new (x: { a: string; b: number; }) => number): new (x: { a: string; b: number; }) => number; (a2: any): any; } >r7arg3 : new (x: { a: T; b: T; }) => number var r7d = [r7arg2, r7arg3]; @@ -514,7 +514,7 @@ module Errors { var r8 = foo16(r8arg); // any >r8 : any >foo16(r8arg) : any ->foo16 : typeof foo16 +>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; } >r8arg : new (x: new (a: T) => T) => T[] var r9arg: new (x: new (a: T) => T) => any[]; @@ -528,7 +528,7 @@ module Errors { var r9 = foo17(r9arg); // // (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; >r9 : { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; } >foo17(r9arg) : { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; } ->foo17 : typeof foo17 +>foo17 : { (a2: { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }): { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }; (a2: any): any; } >r9arg : new (x: new (a: T) => T) => any[] } @@ -536,7 +536,7 @@ module WithGenericSignaturesInBaseType { >WithGenericSignaturesInBaseType : typeof WithGenericSignaturesInBaseType declare function foo2(a2: new (x: T) => T[]): typeof a2; ->foo2 : typeof foo2 +>foo2 : { (a2: new (x: T) => T[]): new (x: T) => T[]; (a2: any): any; } >a2 : new (x: T) => T[] >T : T >x : T @@ -545,7 +545,7 @@ module WithGenericSignaturesInBaseType { >a2 : new (x: T) => T[] declare function foo2(a2: any): any; ->foo2 : typeof foo2 +>foo2 : { (a2: new (x: T) => T[]): new (x: T) => T[]; (a2: any): any; } >a2 : any var r2arg2: new (x: T) => string[]; @@ -557,11 +557,11 @@ module WithGenericSignaturesInBaseType { var r2 = foo2(r2arg2); // (x:T) => T[] since we can infer from generic signatures now >r2 : new (x: T) => T[] >foo2(r2arg2) : new (x: T) => T[] ->foo2 : typeof foo2 +>foo2 : { (a2: new (x: T) => T[]): new (x: T) => T[]; (a2: any): any; } >r2arg2 : new (x: T) => string[] declare function foo3(a2: new (x: T) => string[]): typeof a2; ->foo3 : typeof foo3 +>foo3 : { (a2: new (x: T) => string[]): new (x: T) => string[]; (a2: any): any; } >a2 : new (x: T) => string[] >T : T >x : T @@ -569,7 +569,7 @@ module WithGenericSignaturesInBaseType { >a2 : new (x: T) => string[] declare function foo3(a2: any): any; ->foo3 : typeof foo3 +>foo3 : { (a2: new (x: T) => string[]): new (x: T) => string[]; (a2: any): any; } >a2 : any var r3arg2: new (x: T) => T[]; @@ -582,6 +582,6 @@ module WithGenericSignaturesInBaseType { var r3 = foo3(r3arg2); // any >r3 : any >foo3(r3arg2) : any ->foo3 : typeof foo3 +>foo3 : { (a2: new (x: T) => string[]): new (x: T) => string[]; (a2: any): any; } >r3arg2 : new (x: T) => T[] } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.types b/tests/baselines/reference/subtypingWithConstructSignatures4.types index d168c57a7eb..a9116880df3 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.types +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.types @@ -21,7 +21,7 @@ class OtherDerived extends Base { bing: string; } >bing : string declare function foo1(a: new (x: T) => T[]); ->foo1 : typeof foo1 +>foo1 : { (a: new (x: T) => T[]): any; (a: any): any; } >a : new (x: T) => T[] >T : T >x : T @@ -29,33 +29,33 @@ declare function foo1(a: new (x: T) => T[]); >T : T declare function foo1(a: any): any; ->foo1 : typeof foo1 +>foo1 : { (a: new (x: T) => T[]): any; (a: any): any; } >a : any declare function foo2(a2: new (x: T) => string[]); ->foo2 : typeof foo2 +>foo2 : { (a2: new (x: T) => string[]): any; (a: any): any; } >a2 : new (x: T) => string[] >T : T >x : T >T : T declare function foo2(a: any): any; ->foo2 : typeof foo2 +>foo2 : { (a2: new (x: T) => string[]): any; (a: any): any; } >a : any declare function foo3(a3: new (x: T) => void); ->foo3 : typeof foo3 +>foo3 : { (a3: new (x: T) => void): any; (a: any): any; } >a3 : new (x: T) => void >T : T >x : T >T : T declare function foo3(a: any): any; ->foo3 : typeof foo3 +>foo3 : { (a3: new (x: T) => void): any; (a: any): any; } >a : any declare function foo4(a4: new (x: T, y: U) => string); ->foo4 : typeof foo4 +>foo4 : { (a4: new (x: T, y: U) => string): any; (a: any): any; } >a4 : new (x: T, y: U) => string >T : T >U : U @@ -65,11 +65,11 @@ declare function foo4(a4: new (x: T, y: U) => string); >U : U declare function foo4(a: any): any; ->foo4 : typeof foo4 +>foo4 : { (a4: new (x: T, y: U) => string): any; (a: any): any; } >a : any declare function foo5(a5: new (x: new (arg: T) => U) => T); ->foo5 : typeof foo5 +>foo5 : { (a5: new (x: new (arg: T) => U) => T): any; (a: any): any; } >a5 : new (x: new (arg: T) => U) => T >T : T >U : U @@ -80,11 +80,11 @@ declare function foo5(a5: new (x: new (arg: T) => U) => T); >T : T declare function foo5(a: any): any; ->foo5 : typeof foo5 +>foo5 : { (a5: new (x: new (arg: T) => U) => T): any; (a: any): any; } >a : any declare function foo6(a6: new (x: new (arg: T) => Derived) => T); ->foo6 : typeof foo6 +>foo6 : { (a6: new (x: new (arg: T) => Derived) => T): any; (a: any): any; } >a6 : new (x: new (arg: T) => Derived) => T >T : T >Base : Base @@ -95,11 +95,11 @@ declare function foo6(a6: new (x: new (arg: T) => Derived) => T) >T : T declare function foo6(a: any): any; ->foo6 : typeof foo6 +>foo6 : { (a6: new (x: new (arg: T) => Derived) => T): any; (a: any): any; } >a : any declare function foo11(a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Base); ->foo11 : typeof foo11 +>foo11 : { (a11: new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base): any; (a: any): any; } >a11 : new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base >T : T >x : { foo: T; } @@ -113,11 +113,11 @@ declare function foo11(a11: new (x: { foo: T }, y: { foo: T; bar: T }) => Bas >Base : Base declare function foo11(a: any): any; ->foo11 : typeof foo11 +>foo11 : { (a11: new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base): any; (a: any): any; } >a : any declare function foo15(a15: new (x: { a: T; b: T }) => T[]); ->foo15 : typeof foo15 +>foo15 : { (a15: new (x: { a: T; b: T; }) => T[]): any; (a: any): any; } >a15 : new (x: { a: T; b: T; }) => T[] >T : T >x : { a: T; b: T; } @@ -128,11 +128,11 @@ declare function foo15(a15: new (x: { a: T; b: T }) => T[]); >T : T declare function foo15(a: any): any; ->foo15 : typeof foo15 +>foo15 : { (a15: new (x: { a: T; b: T; }) => T[]): any; (a: any): any; } >a : any declare function foo16(a16: new (x: { a: T; b: T }) => T[]); ->foo16 : typeof foo16 +>foo16 : { (a16: new (x: { a: T; b: T; }) => T[]): any; (a: any): any; } >a16 : new (x: { a: T; b: T; }) => T[] >T : T >Base : Base @@ -144,11 +144,11 @@ declare function foo16(a16: new (x: { a: T; b: T }) => T[]); >T : T declare function foo16(a: any): any; ->foo16 : typeof foo16 +>foo16 : { (a16: new (x: { a: T; b: T; }) => T[]): any; (a: any): any; } >a : any declare function foo17(a17: { ->foo17 : typeof foo17 +>foo17 : { (a17: { new (x: new (a: T) => T): T[]; new (x: new (a: T) => T): T[]; }): any; (a: any): any; } >a17 : { new (x: new (a: T) => T): T[]; new (x: new (a: T) => T): T[]; } new (x: new (a: T) => T): T[]; @@ -171,11 +171,11 @@ declare function foo17(a17: { }); declare function foo17(a: any): any; ->foo17 : typeof foo17 +>foo17 : { (a17: { new (x: new (a: T) => T): T[]; new (x: new (a: T) => T): T[]; }): any; (a: any): any; } >a : any declare function foo18(a18: { ->foo18 : typeof foo18 +>foo18 : { (a18: { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }): any; (a: any): any; } >a18 : { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; } new (x: { @@ -216,7 +216,7 @@ declare function foo18(a18: { }): any[]; }); declare function foo18(a: any): any; ->foo18 : typeof foo18 +>foo18 : { (a18: { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }): any; (a: any): any; } >a : any var r1arg: new (x: T) => T[]; @@ -236,7 +236,7 @@ var r1arg2: new (x: T) => T[]; var r1 = foo1(r1arg); >r1 : any >foo1(r1arg) : any ->foo1 : typeof foo1 +>foo1 : { (a: new (x: T) => T[]): any; (a: any): any; } >r1arg : new (x: T) => T[] var r1a = [r1arg, r1arg2]; @@ -266,7 +266,7 @@ var r2arg2: new (x: T) => string[]; var r2 = foo2(r2arg); >r2 : any >foo2(r2arg) : any ->foo2 : typeof foo2 +>foo2 : { (a2: new (x: T) => string[]): any; (a: any): any; } >r2arg : new (x: T) => string[] var r2a = [r2arg, r2arg2]; @@ -297,7 +297,7 @@ var r3arg2: new (x: T) => void; var r3 = foo3(r3arg); >r3 : any >foo3(r3arg) : any ->foo3 : typeof foo3 +>foo3 : { (a3: new (x: T) => void): any; (a: any): any; } >r3arg : new (x: T) => T var r3a = [r3arg, r3arg2]; @@ -333,7 +333,7 @@ var r4arg2: new (x: T, y: U) => string; var r4 = foo4(r4arg); >r4 : any >foo4(r4arg) : any ->foo4 : typeof foo4 +>foo4 : { (a4: new (x: T, y: U) => string): any; (a: any): any; } >r4arg : new (x: T, y: U) => string var r4a = [r4arg, r4arg2]; @@ -371,7 +371,7 @@ var r5arg2: new (x: new (arg: T) => U) => T; var r5 = foo5(r5arg); >r5 : any >foo5(r5arg) : any ->foo5 : typeof foo5 +>foo5 : { (a5: new (x: new (arg: T) => U) => T): any; (a: any): any; } >r5arg : new (x: new (arg: T) => U) => T var r5a = [r5arg, r5arg2]; @@ -411,7 +411,7 @@ var r6arg2: new (x: new (arg: T) => Derived) => T; var r6 = foo6(r6arg); >r6 : any >foo6(r6arg) : any ->foo6 : typeof foo6 +>foo6 : { (a6: new (x: new (arg: T) => Derived) => T): any; (a: any): any; } >r6arg : new (x: new (arg: T) => U) => T var r6a = [r6arg, r6arg2]; @@ -456,7 +456,7 @@ var r11arg2: new (x: { foo: T }, y: { foo: T; bar: T }) => Base; var r11 = foo11(r11arg); >r11 : any >foo11(r11arg) : any ->foo11 : typeof foo11 +>foo11 : { (a11: new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base): any; (a: any): any; } >r11arg : new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base var r11a = [r11arg, r11arg2]; @@ -495,7 +495,7 @@ var r15arg2: new (x: { a: T; b: T }) => T[]; var r15 = foo15(r15arg); >r15 : any >foo15(r15arg) : any ->foo15 : typeof foo15 +>foo15 : { (a15: new (x: { a: T; b: T; }) => T[]): any; (a: any): any; } >r15arg : new (x: { a: U; b: V; }) => U[] var r15a = [r15arg, r15arg2]; @@ -535,7 +535,7 @@ var r16arg2: new (x: { a: T; b: T }) => T[]; var r16 = foo16(r16arg); >r16 : any >foo16(r16arg) : any ->foo16 : typeof foo16 +>foo16 : { (a16: new (x: { a: T; b: T; }) => T[]): any; (a: any): any; } >r16arg : new (x: { a: T; b: T; }) => T[] var r16a = [r16arg, r16arg2]; @@ -562,7 +562,7 @@ var r17arg: new (x: new (a: T) => T) => T[]; var r17 = foo17(r17arg); >r17 : any >foo17(r17arg) : any ->foo17 : typeof foo17 +>foo17 : { (a17: { new (x: new (a: T) => T): T[]; new (x: new (a: T) => T): T[]; }): any; (a: any): any; } >r17arg : new (x: new (a: T) => T) => T[] var r18arg: new (x: new (a: T) => T) => any[]; @@ -576,6 +576,6 @@ var r18arg: new (x: new (a: T) => T) => any[]; var r18 = foo18(r18arg); >r18 : any >foo18(r18arg) : any ->foo18 : typeof foo18 +>foo18 : { (a18: { new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }): any; (a: any): any; } >r18arg : new (x: new (a: T) => T) => any[] diff --git a/tests/baselines/reference/subtypingWithOptionalProperties.types b/tests/baselines/reference/subtypingWithOptionalProperties.types index d16903202d7..67eeb274c6b 100644 --- a/tests/baselines/reference/subtypingWithOptionalProperties.types +++ b/tests/baselines/reference/subtypingWithOptionalProperties.types @@ -3,7 +3,7 @@ // returns { s?: number; } function f(a: T) { ->f : typeof f +>f : (a: T) => { s?: number; } >T : T >a : T >T : T @@ -20,7 +20,7 @@ function f(a: T) { var r = f({ s: new Object() }); // ok >r : { s?: number; } >f({ s: new Object() }) : { s?: number; } ->f : typeof f +>f : (a: T) => { s?: number; } >{ s: new Object() } : { s: Object; } >s : Object >new Object() : Object diff --git a/tests/baselines/reference/superCalls.types b/tests/baselines/reference/superCalls.types index fcb0ef045bc..ef983183f9c 100644 --- a/tests/baselines/reference/superCalls.types +++ b/tests/baselines/reference/superCalls.types @@ -12,7 +12,7 @@ class Base { } function v(): void { } ->v : typeof v +>v : () => void class Derived extends Base { >Derived : Derived @@ -35,7 +35,7 @@ class Derived extends Base { var p = v(); >p : void >v() : void ->v : typeof v +>v : () => void } } diff --git a/tests/baselines/reference/switchFallThroughs.types b/tests/baselines/reference/switchFallThroughs.types index 0d3f7ccb871..dfca84cfa4c 100644 --- a/tests/baselines/reference/switchFallThroughs.types +++ b/tests/baselines/reference/switchFallThroughs.types @@ -1,6 +1,6 @@ === tests/cases/compiler/switchFallThroughs.ts === function R1(index: number) { ->R1 : typeof R1 +>R1 : (index: number) => string >index : number switch (index) { diff --git a/tests/baselines/reference/switchStatements.types b/tests/baselines/reference/switchStatements.types index bbcd3553385..1c951c5e098 100644 --- a/tests/baselines/reference/switchStatements.types +++ b/tests/baselines/reference/switchStatements.types @@ -3,7 +3,7 @@ module M { >M : typeof M export function fn(x: number) { ->fn : typeof fn +>fn : (x: number) => string >x : number return ''; @@ -55,9 +55,9 @@ switch (x) { case M.fn(1): >M.fn(1) : string ->M.fn : typeof M.fn +>M.fn : (x: number) => string >M : typeof M ->fn : typeof M.fn +>fn : (x: number) => string case (x: number) => '': >(x: number) => '' : (x: number) => string diff --git a/tests/baselines/reference/targetTypeArgs.types b/tests/baselines/reference/targetTypeArgs.types index ec14cdf4e0f..80c99ff9ff3 100644 --- a/tests/baselines/reference/targetTypeArgs.types +++ b/tests/baselines/reference/targetTypeArgs.types @@ -1,6 +1,6 @@ === tests/cases/compiler/targetTypeArgs.ts === function foo(callback: (x: string) => void) { ->foo : typeof foo +>foo : (callback: (x: string) => void) => void >callback : (x: string) => void >x : string @@ -11,7 +11,7 @@ function foo(callback: (x: string) => void) { foo(function(x) { x }); >foo(function(x) { x }) : void ->foo : typeof foo +>foo : (callback: (x: string) => void) => void >function(x) { x } : (x: string) => void >x : string >x : string diff --git a/tests/baselines/reference/targetTypeObjectLiteralToAny.types b/tests/baselines/reference/targetTypeObjectLiteralToAny.types index 3bc76954da3..ebbafd39d8d 100644 --- a/tests/baselines/reference/targetTypeObjectLiteralToAny.types +++ b/tests/baselines/reference/targetTypeObjectLiteralToAny.types @@ -1,6 +1,6 @@ === tests/cases/compiler/targetTypeObjectLiteralToAny.ts === function suggest(){ ->suggest : typeof suggest +>suggest : () => void var TypeScriptKeywords:string[]; >TypeScriptKeywords : string[] diff --git a/tests/baselines/reference/targetTypeTest2.types b/tests/baselines/reference/targetTypeTest2.types index dc8b5359250..795dd7036f7 100644 --- a/tests/baselines/reference/targetTypeTest2.types +++ b/tests/baselines/reference/targetTypeTest2.types @@ -8,19 +8,19 @@ var a : any[] = [1,2,"3"]; function func1(stuff:any[]) { return stuff; } ->func1 : typeof func1 +>func1 : (stuff: any[]) => any[] >stuff : any[] >stuff : any[] function func2(stuff1:string, stuff2:number, stuff3:number) { ->func2 : typeof func2 +>func2 : (stuff1: string, stuff2: number, stuff3: number) => any[] >stuff1 : string >stuff2 : number >stuff3 : number return func1([stuff1, stuff2, stuff3]); >func1([stuff1, stuff2, stuff3]) : any[] ->func1 : typeof func1 +>func1 : (stuff: any[]) => any[] >[stuff1, stuff2, stuff3] : any[] >stuff1 : string >stuff2 : number diff --git a/tests/baselines/reference/thisBinding2.types b/tests/baselines/reference/thisBinding2.types index d2027a4ea5b..441a8f575c0 100644 --- a/tests/baselines/reference/thisBinding2.types +++ b/tests/baselines/reference/thisBinding2.types @@ -44,7 +44,7 @@ class C { } } declare function setTimeout(expression: any, msec?: number, language?: any): number; ->setTimeout : typeof setTimeout +>setTimeout : (expression: any, msec?: number, language?: any) => number >expression : any >msec : number >language : any @@ -62,7 +62,7 @@ var messenger = { return setTimeout(() => { var x = this.message; }, 3000); >setTimeout(() => { var x = this.message; }, 3000) : number ->setTimeout : typeof setTimeout +>setTimeout : (expression: any, msec?: number, language?: any) => number >() => { var x = this.message; } : () => void >x : any >this.message : any diff --git a/tests/baselines/reference/thisExpressionInIndexExpression.types b/tests/baselines/reference/thisExpressionInIndexExpression.types index 057fb2f9db7..b26dbb8bde7 100644 --- a/tests/baselines/reference/thisExpressionInIndexExpression.types +++ b/tests/baselines/reference/thisExpressionInIndexExpression.types @@ -1,6 +1,6 @@ === tests/cases/compiler/thisExpressionInIndexExpression.ts === function f() { ->f : typeof f +>f : () => (r: any) => any return r => r[this]; >r => r[this] : (r: any) => any diff --git a/tests/baselines/reference/thisInInnerFunctions.types b/tests/baselines/reference/thisInInnerFunctions.types index cec73bbdcf0..b47b917a469 100644 --- a/tests/baselines/reference/thisInInnerFunctions.types +++ b/tests/baselines/reference/thisInInnerFunctions.types @@ -28,7 +28,7 @@ class Foo { } function test() { ->test : typeof test +>test : () => void var x = () => { >x : () => void diff --git a/tests/baselines/reference/thisInLambda.types b/tests/baselines/reference/thisInLambda.types index 950b7ecc3ef..ebc32449f07 100644 --- a/tests/baselines/reference/thisInLambda.types +++ b/tests/baselines/reference/thisInLambda.types @@ -23,7 +23,7 @@ class Foo { } function myFn(a:any) { } ->myFn : typeof myFn +>myFn : (a: any) => void >a : any class myCls { @@ -32,12 +32,12 @@ class myCls { constructor () { myFn(() => { >myFn(() => { myFn(() => { var x = this; }); }) : void ->myFn : typeof myFn +>myFn : (a: any) => void >() => { myFn(() => { var x = this; }); } : () => void myFn(() => { >myFn(() => { var x = this; }) : void ->myFn : typeof myFn +>myFn : (a: any) => void >() => { var x = this; } : () => void var x = this; diff --git a/tests/baselines/reference/thisInModuleFunction1.types b/tests/baselines/reference/thisInModuleFunction1.types index 28da3bc4650..c73f9ebbd9c 100644 --- a/tests/baselines/reference/thisInModuleFunction1.types +++ b/tests/baselines/reference/thisInModuleFunction1.types @@ -3,7 +3,7 @@ module bar { >bar : typeof bar export function bar() { ->bar : typeof bar +>bar : () => any return this; >this : any @@ -12,7 +12,7 @@ module bar { var z = bar.bar(); >z : any >bar.bar() : any ->bar.bar : typeof bar.bar +>bar.bar : () => any >bar : typeof bar ->bar : typeof bar.bar +>bar : () => any diff --git a/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.types b/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.types index 03b7ba5db3b..8e387fd66c1 100644 --- a/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.types +++ b/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.types @@ -5,7 +5,7 @@ var foo = (dummy) => { }; >dummy : any function test() ->test : typeof test +>test : () => void { foo(() => >foo(() => function () { return this; } ) : void diff --git a/tests/baselines/reference/throwInEnclosingStatements.types b/tests/baselines/reference/throwInEnclosingStatements.types index 50b8aa97e64..d642dc55b0b 100644 --- a/tests/baselines/reference/throwInEnclosingStatements.types +++ b/tests/baselines/reference/throwInEnclosingStatements.types @@ -1,6 +1,6 @@ === tests/cases/conformance/statements/throwStatements/throwInEnclosingStatements.ts === function fn(x) { ->fn : typeof fn +>fn : (x: any) => void >x : any throw x; diff --git a/tests/baselines/reference/throwStatements.types b/tests/baselines/reference/throwStatements.types index 73f3fe41b5b..efc2ff24124 100644 --- a/tests/baselines/reference/throwStatements.types +++ b/tests/baselines/reference/throwStatements.types @@ -37,7 +37,7 @@ class D{ } function F(x: string): number { return 42; } ->F : typeof F +>F : (x: string) => number >x : string module M { @@ -51,7 +51,7 @@ module M { } export function F2(x: number): string { return x.toString(); } ->F2 : typeof F2 +>F2 : (x: number) => string >x : number >x.toString() : string >x.toString : (radix?: number) => string @@ -134,15 +134,15 @@ throw anObjectLiteral; >anObjectLiteral : { id: number; } var aFunction = F; ->aFunction : typeof F ->F : typeof F +>aFunction : (x: string) => number +>F : (x: string) => number throw aFunction; ->aFunction : typeof F +>aFunction : (x: string) => number throw aFunction(''); >aFunction('') : number ->aFunction : typeof F +>aFunction : (x: string) => number var aLambda = (x) => 2; >aLambda : (x: any) => number @@ -178,13 +178,13 @@ throw aClassInModule; >aClassInModule : M.A var aFunctionInModule = M.F2; ->aFunctionInModule : typeof M.F2 ->M.F2 : typeof M.F2 +>aFunctionInModule : (x: number) => string +>M.F2 : (x: number) => string >M : typeof M ->F2 : typeof M.F2 +>F2 : (x: number) => string throw aFunctionInModule; ->aFunctionInModule : typeof M.F2 +>aFunctionInModule : (x: number) => string // no initializer or annotation, so this is an 'any' var x; diff --git a/tests/baselines/reference/topLevelExports.types b/tests/baselines/reference/topLevelExports.types index 38789ad5304..c4076a80239 100644 --- a/tests/baselines/reference/topLevelExports.types +++ b/tests/baselines/reference/topLevelExports.types @@ -3,7 +3,7 @@ export var foo = 3; >foo : number function log(n:number) { return n;} ->log : typeof log +>log : (n: number) => number >n : number >n : number @@ -12,7 +12,7 @@ void log(foo).toString(); >log(foo).toString() : string >log(foo).toString : (radix?: number) => string >log(foo) : number ->log : typeof log +>log : (n: number) => number >foo : number >toString : (radix?: number) => string diff --git a/tests/baselines/reference/topLevelLambda2.types b/tests/baselines/reference/topLevelLambda2.types index 04f1c0833cb..7dcb909cdf9 100644 --- a/tests/baselines/reference/topLevelLambda2.types +++ b/tests/baselines/reference/topLevelLambda2.types @@ -1,11 +1,11 @@ === tests/cases/compiler/topLevelLambda2.ts === function foo(x:any) {} ->foo : typeof foo +>foo : (x: any) => void >x : any foo(()=>this.window); >foo(()=>this.window) : void ->foo : typeof foo +>foo : (x: any) => void >()=>this.window : () => any >this.window : any >this : any diff --git a/tests/baselines/reference/tryStatements.types b/tests/baselines/reference/tryStatements.types index 54a1b1539b5..07bc3997d83 100644 --- a/tests/baselines/reference/tryStatements.types +++ b/tests/baselines/reference/tryStatements.types @@ -1,6 +1,6 @@ === tests/cases/conformance/statements/tryStatements/tryStatements.ts === function fn() { ->fn : typeof fn +>fn : () => void try { diff --git a/tests/baselines/reference/typeArgInference2.types b/tests/baselines/reference/typeArgInference2.types index d7bc7eb7ebc..b6568afee24 100644 --- a/tests/baselines/reference/typeArgInference2.types +++ b/tests/baselines/reference/typeArgInference2.types @@ -7,7 +7,7 @@ interface Item { } declare function foo(x?: T, y?: T): T; ->foo : typeof foo +>foo : (x?: T, y?: T) => T >T : T >Item : Item >x : T @@ -19,31 +19,31 @@ declare function foo(x?: T, y?: T): T; var z1 = foo(null); // any >z1 : any >foo(null) : any ->foo : typeof foo +>foo : (x?: T, y?: T) => T var z2 = foo(); // Item >z2 : Item >foo() : Item ->foo : typeof foo +>foo : (x?: T, y?: T) => T var z3 = foo({ name: null }); // { name: any } >z3 : { name: any; } >foo({ name: null }) : { name: any; } ->foo : typeof foo +>foo : (x?: T, y?: T) => T >{ name: null } : { name: null; } >name : any var z4 = foo({ name: "abc" }); // { name: string } >z4 : { name: string; } >foo({ name: "abc" }) : { name: string; } ->foo : typeof foo +>foo : (x?: T, y?: T) => T >{ name: "abc" } : { name: string; } >name : string var z5 = foo({ name: "abc", a: 5 }); // { name: string; a: number } >z5 : { name: string; a: number; } >foo({ name: "abc", a: 5 }) : { name: string; a: number; } ->foo : typeof foo +>foo : (x?: T, y?: T) => T >{ name: "abc", a: 5 } : { name: string; a: number; } >name : string >a : number @@ -51,7 +51,7 @@ var z5 = foo({ name: "abc", a: 5 }); // { name: string; a: number } var z6 = foo({ name: "abc", a: 5 }, { name: "def", b: 5 }); // Item >z6 : Item >foo({ name: "abc", a: 5 }, { name: "def", b: 5 }) : Item ->foo : typeof foo +>foo : (x?: T, y?: T) => T >{ name: "abc", a: 5 } : { name: string; a: number; } >name : string >a : number diff --git a/tests/baselines/reference/typeArgInferenceWithNull.types b/tests/baselines/reference/typeArgInferenceWithNull.types index cb3bbe344b3..9fd3ea33e24 100644 --- a/tests/baselines/reference/typeArgInferenceWithNull.types +++ b/tests/baselines/reference/typeArgInferenceWithNull.types @@ -2,17 +2,17 @@ // All legal function fn4(n: T) { } ->fn4 : typeof fn4 +>fn4 : (n: T) => void >T : T >n : T >T : T fn4(null); >fn4(null) : void ->fn4 : typeof fn4 +>fn4 : (n: T) => void function fn5(n: T) { } ->fn5 : typeof fn5 +>fn5 : (n: T) => void >T : T >x : string >n : T @@ -20,12 +20,12 @@ function fn5(n: T) { } fn5({ x: null }); >fn5({ x: null }) : void ->fn5 : typeof fn5 +>fn5 : (n: T) => void >{ x: null } : { x: null; } >x : any function fn6(n: T, fun: (x: T) => void, n2: T) { } ->fn6 : typeof fn6 +>fn6 : (n: T, fun: (x: T) => void, n2: T) => void >T : T >x : string >n : T @@ -38,7 +38,7 @@ function fn6(n: T, fun: (x: T) => void, n2: T) { } fn6({ x: null }, y => { }, { x: "" }); // y has type { x: any }, but ideally would have type { x: string } >fn6({ x: null }, y => { }, { x: "" }) : void ->fn6 : typeof fn6 +>fn6 : (n: T, fun: (x: T) => void, n2: T) => void >{ x: null } : { x: null; } >x : any >y => { } : (y: { x: string; }) => void diff --git a/tests/baselines/reference/typeArgumentInference.types b/tests/baselines/reference/typeArgumentInference.types index 0930cad6e53..40136bd10c3 100644 --- a/tests/baselines/reference/typeArgumentInference.types +++ b/tests/baselines/reference/typeArgumentInference.types @@ -1,42 +1,42 @@ === tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts === // Generic call with no parameters function noParams() { } ->noParams : typeof noParams +>noParams : () => void >T : T noParams(); >noParams() : void ->noParams : typeof noParams +>noParams : () => void noParams(); >noParams() : void ->noParams : typeof noParams +>noParams : () => void noParams<{}>(); >noParams<{}>() : void ->noParams : typeof noParams +>noParams : () => void // Generic call with parameters but none use type parameter type function noGenericParams(n: string) { } ->noGenericParams : typeof noGenericParams +>noGenericParams : (n: string) => void >T : T >n : string noGenericParams(''); >noGenericParams('') : void ->noGenericParams : typeof noGenericParams +>noGenericParams : (n: string) => void noGenericParams(''); >noGenericParams('') : void ->noGenericParams : typeof noGenericParams +>noGenericParams : (n: string) => void noGenericParams<{}>(''); >noGenericParams<{}>('') : void ->noGenericParams : typeof noGenericParams +>noGenericParams : (n: string) => void // Generic call with multiple type parameters and only one used in parameter type annotation function someGenerics1(n: T, m: number) { } ->someGenerics1 : typeof someGenerics1 +>someGenerics1 : (n: T, m: number) => void >T : T >U : U >n : T @@ -45,15 +45,15 @@ function someGenerics1(n: T, m: number) { } someGenerics1(3, 4); >someGenerics1(3, 4) : void ->someGenerics1 : typeof someGenerics1 +>someGenerics1 : (n: T, m: number) => void someGenerics1(3, 4); >someGenerics1(3, 4) : void ->someGenerics1 : typeof someGenerics1 +>someGenerics1 : (n: T, m: number) => void // Generic call with argument of function type whose parameter is of type parameter type function someGenerics2a(n: (x: T) => void) { } ->someGenerics2a : typeof someGenerics2a +>someGenerics2a : (n: (x: T) => void) => void >T : T >n : (x: T) => void >x : T @@ -61,21 +61,21 @@ function someGenerics2a(n: (x: T) => void) { } someGenerics2a((n: string) => n); >someGenerics2a((n: string) => n) : void ->someGenerics2a : typeof someGenerics2a +>someGenerics2a : (n: (x: T) => void) => void >(n: string) => n : (n: string) => string >n : string >n : string someGenerics2a((n: string) => n); >someGenerics2a((n: string) => n) : void ->someGenerics2a : typeof someGenerics2a +>someGenerics2a : (n: (x: T) => void) => void >(n: string) => n : (n: string) => string >n : string >n : string someGenerics2a((n) => n.substr(0)); >someGenerics2a((n) => n.substr(0)) : void ->someGenerics2a : typeof someGenerics2a +>someGenerics2a : (n: (x: T) => void) => void >(n) => n.substr(0) : (n: string) => string >n : string >n.substr(0) : string @@ -84,7 +84,7 @@ someGenerics2a((n) => n.substr(0)); >substr : (from: number, length?: number) => string function someGenerics2b(n: (x: T, y: U) => void) { } ->someGenerics2b : typeof someGenerics2b +>someGenerics2b : (n: (x: T, y: U) => void) => void >T : T >U : U >n : (x: T, y: U) => void @@ -95,7 +95,7 @@ function someGenerics2b(n: (x: T, y: U) => void) { } someGenerics2b((n: string, x: number) => n); >someGenerics2b((n: string, x: number) => n) : void ->someGenerics2b : typeof someGenerics2b +>someGenerics2b : (n: (x: T, y: U) => void) => void >(n: string, x: number) => n : (n: string, x: number) => string >n : string >x : number @@ -103,7 +103,7 @@ someGenerics2b((n: string, x: number) => n); someGenerics2b((n: string, t: number) => n); >someGenerics2b((n: string, t: number) => n) : void ->someGenerics2b : typeof someGenerics2b +>someGenerics2b : (n: (x: T, y: U) => void) => void >(n: string, t: number) => n : (n: string, t: number) => string >n : string >t : number @@ -111,7 +111,7 @@ someGenerics2b((n: string, t: number) => n); someGenerics2b((n, t) => n.substr(t * t)); >someGenerics2b((n, t) => n.substr(t * t)) : void ->someGenerics2b : typeof someGenerics2b +>someGenerics2b : (n: (x: T, y: U) => void) => void >(n, t) => n.substr(t * t) : (n: string, t: number) => string >n : string >t : number @@ -125,31 +125,31 @@ someGenerics2b((n, t) => n.substr(t * t)); // Generic call with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter function someGenerics3(producer: () => T) { } ->someGenerics3 : typeof someGenerics3 +>someGenerics3 : (producer: () => T) => void >T : T >producer : () => T >T : T someGenerics3(() => ''); >someGenerics3(() => '') : void ->someGenerics3 : typeof someGenerics3 +>someGenerics3 : (producer: () => T) => void >() => '' : () => string someGenerics3(() => undefined); >someGenerics3(() => undefined) : void ->someGenerics3 : typeof someGenerics3 +>someGenerics3 : (producer: () => T) => void >Date : Date >() => undefined : () => any >undefined : undefined someGenerics3(() => 3); >someGenerics3(() => 3) : void ->someGenerics3 : typeof someGenerics3 +>someGenerics3 : (producer: () => T) => void >() => 3 : () => number // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type function someGenerics4(n: T, f: (x: U) => void) { } ->someGenerics4 : typeof someGenerics4 +>someGenerics4 : (n: T, f: (x: U) => void) => void >T : T >U : U >n : T @@ -160,21 +160,21 @@ function someGenerics4(n: T, f: (x: U) => void) { } someGenerics4(4, () => null); >someGenerics4(4, () => null) : void ->someGenerics4 : typeof someGenerics4 +>someGenerics4 : (n: T, f: (x: U) => void) => void >() => null : () => any someGenerics4('', () => 3); >someGenerics4('', () => 3) : void ->someGenerics4 : typeof someGenerics4 +>someGenerics4 : (n: T, f: (x: U) => void) => void >() => 3 : () => number someGenerics4(null, null); >someGenerics4(null, null) : void ->someGenerics4 : typeof someGenerics4 +>someGenerics4 : (n: T, f: (x: U) => void) => void // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type function someGenerics5(n: T, f: (x: U) => void) { } ->someGenerics5 : typeof someGenerics5 +>someGenerics5 : (n: T, f: (x: U) => void) => void >U : U >T : T >n : T @@ -185,21 +185,21 @@ function someGenerics5(n: T, f: (x: U) => void) { } someGenerics5(4, () => null); >someGenerics5(4, () => null) : void ->someGenerics5 : typeof someGenerics5 +>someGenerics5 : (n: T, f: (x: U) => void) => void >() => null : () => any someGenerics5('', () => 3); >someGenerics5('', () => 3) : void ->someGenerics5 : typeof someGenerics5 +>someGenerics5 : (n: T, f: (x: U) => void) => void >() => 3 : () => number someGenerics5(null, null); >someGenerics5(null, null) : void ->someGenerics5 : typeof someGenerics5 +>someGenerics5 : (n: T, f: (x: U) => void) => void // Generic call with multiple arguments of function types that each have parameters of the same generic type function someGenerics6(a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } ->someGenerics6 : typeof someGenerics6 +>someGenerics6 : (a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) => void >A : A >a : (a: A) => A >a : A @@ -216,7 +216,7 @@ function someGenerics6(a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } someGenerics6(n => n, n => n, n => n); >someGenerics6(n => n, n => n, n => n) : void ->someGenerics6 : typeof someGenerics6 +>someGenerics6 : (a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) => void >n => n : (n: {}) => {} >n : {} >n : {} @@ -229,7 +229,7 @@ someGenerics6(n => n, n => n, n => n); someGenerics6(n => n, n => n, n => n); >someGenerics6(n => n, n => n, n => n) : void ->someGenerics6 : typeof someGenerics6 +>someGenerics6 : (a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) => void >n => n : (n: number) => number >n : number >n : number @@ -242,7 +242,7 @@ someGenerics6(n => n, n => n, n => n); someGenerics6((n: number) => n, (n: number) => n, (n: number) => n); >someGenerics6((n: number) => n, (n: number) => n, (n: number) => n) : void ->someGenerics6 : typeof someGenerics6 +>someGenerics6 : (a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) => void >(n: number) => n : (n: number) => number >n : number >n : number @@ -255,7 +255,7 @@ someGenerics6((n: number) => n, (n: number) => n, (n: number) => n); // Generic call with multiple arguments of function types that each have parameters of different generic type function someGenerics7(a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) { } ->someGenerics7 : typeof someGenerics7 +>someGenerics7 : (a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void >A : A >B : B >C : C @@ -274,7 +274,7 @@ function someGenerics7(a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) someGenerics7(n => n, n => n, n => n); >someGenerics7(n => n, n => n, n => n) : void ->someGenerics7 : typeof someGenerics7 +>someGenerics7 : (a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void >n => n : (n: {}) => {} >n : {} >n : {} @@ -287,7 +287,7 @@ someGenerics7(n => n, n => n, n => n); someGenerics7(n => n, n => n, n => n); >someGenerics7(n => n, n => n, n => n) : void ->someGenerics7 : typeof someGenerics7 +>someGenerics7 : (a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void >n => n : (n: number) => number >n : number >n : number @@ -300,7 +300,7 @@ someGenerics7(n => n, n => n, n => n); someGenerics7((n: number) => n, (n: string) => n, (n: number) => n); >someGenerics7((n: number) => n, (n: string) => n, (n: number) => n) : void ->someGenerics7 : typeof someGenerics7 +>someGenerics7 : (a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void >(n: number) => n : (n: number) => number >n : number >n : number @@ -313,7 +313,7 @@ someGenerics7((n: number) => n, (n: string) => n, (n: nu // Generic call with argument of generic function type function someGenerics8(n: T): T { return n; } ->someGenerics8 : typeof someGenerics8 +>someGenerics8 : (n: T) => T >T : T >n : T >T : T @@ -321,18 +321,18 @@ function someGenerics8(n: T): T { return n; } >n : T var x = someGenerics8(someGenerics7); ->x : typeof someGenerics7 ->someGenerics8(someGenerics7) : typeof someGenerics7 ->someGenerics8 : typeof someGenerics8 ->someGenerics7 : typeof someGenerics7 +>x : (a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void +>someGenerics8(someGenerics7) : (a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void +>someGenerics8 : (n: T) => T +>someGenerics7 : (a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void x(null, null, null); >x(null, null, null) : void ->x : typeof someGenerics7 +>x : (a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void // Generic call with multiple parameters of generic type passed arguments with no best common type function someGenerics9(a: T, b: T, c: T): T { ->someGenerics9 : typeof someGenerics9 +>someGenerics9 : (a: T, b: T, c: T) => T >T : T >a : T >T : T @@ -347,7 +347,7 @@ function someGenerics9(a: T, b: T, c: T): T { var a9a = someGenerics9('', 0, []); >a9a : {} >someGenerics9('', 0, []) : {} ->someGenerics9 : typeof someGenerics9 +>someGenerics9 : (a: T, b: T, c: T) => T >[] : undefined[] var a9a: {}; @@ -356,7 +356,7 @@ var a9a: {}; var a9b = someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); >a9b : { a?: number; b?: string; } >someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null) : { a?: number; b?: string; } ->someGenerics9 : typeof someGenerics9 +>someGenerics9 : (a: T, b: T, c: T) => T >a : number >b : string >{ a: 0 } : { a: number; } @@ -392,7 +392,7 @@ interface A92 { var a9e = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); >a9e : {} >someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }) : {} ->someGenerics9 : typeof someGenerics9 +>someGenerics9 : (a: T, b: T, c: T) => T >undefined : undefined >{ x: 6, z: new Date() } : { x: number; z: Date; } >x : number @@ -409,7 +409,7 @@ var a9e: {}; var a9f = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); >a9f : A92 >someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }) : A92 ->someGenerics9 : typeof someGenerics9 +>someGenerics9 : (a: T, b: T, c: T) => T >A92 : A92 >undefined : undefined >{ x: 6, z: new Date() } : { x: number; z: Date; } @@ -429,7 +429,7 @@ var a9f: A92; var a9d = someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); >a9d : { x: number; } >someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }) : { x: number; } ->someGenerics9 : typeof someGenerics9 +>someGenerics9 : (a: T, b: T, c: T) => T >{ x: 3 } : { x: number; } >x : number >{ x: 6 } : { x: number; } @@ -448,7 +448,7 @@ var anyVar: any; var a = someGenerics9(7, anyVar, 4); >a : any >someGenerics9(7, anyVar, 4) : any ->someGenerics9 : typeof someGenerics9 +>someGenerics9 : (a: T, b: T, c: T) => T >anyVar : any var a: any; @@ -458,7 +458,7 @@ var a: any; var arr = someGenerics9([], null, undefined); >arr : any[] >someGenerics9([], null, undefined) : any[] ->someGenerics9 : typeof someGenerics9 +>someGenerics9 : (a: T, b: T, c: T) => T >[] : any[] >undefined : undefined diff --git a/tests/baselines/reference/typeArgumentInferenceOrdering.types b/tests/baselines/reference/typeArgumentInferenceOrdering.types index ebba7ce49c9..62371562c96 100644 --- a/tests/baselines/reference/typeArgumentInferenceOrdering.types +++ b/tests/baselines/reference/typeArgumentInferenceOrdering.types @@ -1,6 +1,6 @@ === tests/cases/compiler/typeArgumentInferenceOrdering.ts === function foo(f: { y: T }): T { return null } ->foo : typeof foo +>foo : (f: { y: T; }) => T >T : T >f : { y: T; } >y : T @@ -11,7 +11,7 @@ var x = foo(new C()).x; // was Error that property x does not exist on type {} >x : () => Goo >foo(new C()).x : () => Goo >foo(new C()) : I ->foo : typeof foo +>foo : (f: { y: T; }) => T >new C() : C >C : typeof C >x : () => Goo diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.types b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.types index 4d4ae199926..35328f72803 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.types +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.types @@ -14,7 +14,7 @@ interface Elephant extends Animal { z } >z : any function f(x: T, y: T): T { return undefined; } ->f : typeof f +>f : (x: T, y: T) => T >T : T >Animal : Animal >x : T @@ -34,7 +34,7 @@ var e: Elephant; f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal >f(g, e) : Animal ->f : typeof f +>f : (x: T, y: T) => T >g : Giraffe >e : Elephant diff --git a/tests/baselines/reference/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.types b/tests/baselines/reference/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.types index b8222e73d92..a3ed77e3488 100644 --- a/tests/baselines/reference/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.types +++ b/tests/baselines/reference/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.types @@ -4,13 +4,13 @@ import f = require('file1'); f.foo(); >f.foo() : any ->f.foo : typeof f.foo +>f.foo : () => any >f : typeof f ->foo : typeof f.foo +>foo : () => any === tests/cases/compiler/file1.ts === export function foo() { ->foo : typeof foo +>foo : () => any var classes = undefined; >classes : any diff --git a/tests/baselines/reference/typeInferenceConflictingCandidates.types b/tests/baselines/reference/typeInferenceConflictingCandidates.types index fc9e2824265..7a77daf4092 100644 --- a/tests/baselines/reference/typeInferenceConflictingCandidates.types +++ b/tests/baselines/reference/typeInferenceConflictingCandidates.types @@ -1,6 +1,6 @@ === tests/cases/compiler/typeInferenceConflictingCandidates.ts === declare function g(a: T, b: T, c: (t: T) => T): T; ->g : typeof g +>g : (a: T, b: T, c: (t: T) => T) => T >T : T >a : T >T : T @@ -14,7 +14,7 @@ declare function g(a: T, b: T, c: (t: T) => T): T; g("", 3, a => a); >g("", 3, a => a) : {} ->g : typeof g +>g : (a: T, b: T, c: (t: T) => T) => T >a => a : (a: {}) => {} >a : {} >a : {} diff --git a/tests/baselines/reference/typeInferenceFixEarly.types b/tests/baselines/reference/typeInferenceFixEarly.types index 47bdcec0c71..c009d2d809e 100644 --- a/tests/baselines/reference/typeInferenceFixEarly.types +++ b/tests/baselines/reference/typeInferenceFixEarly.types @@ -1,6 +1,6 @@ === tests/cases/compiler/typeInferenceFixEarly.ts === declare function f(p: (t: T) => T): T; ->f : typeof f +>f : (p: (t: T) => T) => T >T : T >p : (t: T) => T >t : T @@ -10,7 +10,7 @@ declare function f(p: (t: T) => T): T; f(n => 3); >f(n => 3) : {} ->f : typeof f +>f : (p: (t: T) => T) => T >n => 3 : (n: {}) => number >n : {} diff --git a/tests/baselines/reference/typeInferenceWithTypeAnnotation.types b/tests/baselines/reference/typeInferenceWithTypeAnnotation.types index f47aaf9942b..b1d97ec3fef 100644 --- a/tests/baselines/reference/typeInferenceWithTypeAnnotation.types +++ b/tests/baselines/reference/typeInferenceWithTypeAnnotation.types @@ -1,6 +1,6 @@ === tests/cases/compiler/typeInferenceWithTypeAnnotation.ts === declare function f(p: (t: T) => T): T; ->f : typeof f +>f : (p: (t: T) => T) => T >T : T >p : (t: T) => T >t : T @@ -10,7 +10,7 @@ declare function f(p: (t: T) => T): T; f((n: number) => n); >f((n: number) => n) : number ->f : typeof f +>f : (p: (t: T) => T) => T >(n: number) => n : (n: number) => number >n : number >n : number diff --git a/tests/baselines/reference/typeOfThisInFunctionExpression.types b/tests/baselines/reference/typeOfThisInFunctionExpression.types index 5b66ec0d5c9..b91f5f8c33b 100644 --- a/tests/baselines/reference/typeOfThisInFunctionExpression.types +++ b/tests/baselines/reference/typeOfThisInFunctionExpression.types @@ -2,7 +2,7 @@ // type of 'this' in FunctionExpression is Any function fn() { ->fn : typeof fn +>fn : () => void var p = this; >p : any @@ -69,7 +69,7 @@ module M { >M : typeof M function fn() { ->fn : typeof fn +>fn : () => void var p = this; >p : any diff --git a/tests/baselines/reference/typeParameterAndArgumentOfSameName1.types b/tests/baselines/reference/typeParameterAndArgumentOfSameName1.types index 64195a4a976..5811e481ebd 100644 --- a/tests/baselines/reference/typeParameterAndArgumentOfSameName1.types +++ b/tests/baselines/reference/typeParameterAndArgumentOfSameName1.types @@ -1,6 +1,6 @@ === tests/cases/compiler/typeParameterAndArgumentOfSameName1.ts === function f(A: A): A { ->f : typeof f +>f : (A: A) => A >A : A >Number : Number >A : A diff --git a/tests/baselines/reference/typeParameterAsElementType.types b/tests/baselines/reference/typeParameterAsElementType.types index 46c603af294..0dbbbf5ac7a 100644 --- a/tests/baselines/reference/typeParameterAsElementType.types +++ b/tests/baselines/reference/typeParameterAsElementType.types @@ -1,6 +1,6 @@ === tests/cases/compiler/typeParameterAsElementType.ts === function fee() { ->fee : typeof fee +>fee : () => void >T : T var t: T; diff --git a/tests/baselines/reference/typeParameterAsTypeArgument.types b/tests/baselines/reference/typeParameterAsTypeArgument.types index d8573a1564b..5e0d5ba2437 100644 --- a/tests/baselines/reference/typeParameterAsTypeArgument.types +++ b/tests/baselines/reference/typeParameterAsTypeArgument.types @@ -2,7 +2,7 @@ // These are all errors because type parameters cannot reference other type parameters from the same list function foo(x: T, y: U) { ->foo : typeof foo +>foo : (x: T, y: U) => C >T : T >U : U >x : T @@ -12,7 +12,7 @@ function foo(x: T, y: U) { foo(y, y); >foo(y, y) : C ->foo : typeof foo +>foo : (x: T, y: U) => C >U : U >U : U >y : U diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.types b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.types index 62a19ee5d4f..21f0f4835ab 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.types +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.types @@ -29,7 +29,7 @@ var c: C; >C : C function foo(x: T, y: U, z: V): V { return z; } ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >T : T >U : U >V : V @@ -46,11 +46,11 @@ function foo(x: T, y: U, z: V): V { return z; } foo(1, 2, 3); >foo(1, 2, 3) : number ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: '', z: true }); >foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: '', z: true }) : { x: number; y: string; z: boolean; } ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >{ x: 1 } : { x: number; } >x : number >{ x: 1, y: '' } : { x: number; y: string; } @@ -63,14 +63,14 @@ foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: '', z: true }); foo(a, b, c); >foo(a, b, c) : C ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >a : A >b : B >c : C foo(a, b, { foo: 1, bar: '', hm: true }); >foo(a, b, { foo: 1, bar: '', hm: true }) : { foo: number; bar: string; hm: boolean; } ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >a : A >b : B >{ foo: 1, bar: '', hm: true } : { foo: number; bar: string; hm: boolean; } @@ -80,7 +80,7 @@ foo(a, b, { foo: 1, bar: '', hm: true }); foo((x: number, y) => { }, (x) => { }, () => { }); >foo((x: number, y) => { }, (x) => { }, () => { }) : () => void ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >(x: number, y) => { } : (x: number, y: any) => void >x : number >y : any @@ -89,7 +89,7 @@ foo((x: number, y) => { }, (x) => { }, () => { }); >() => { } : () => void function foo2(x: T, y: U, z: V): V { return z; } ->foo2 : typeof foo2 +>foo2 : (x: T, y: U, z: V) => V >T : T >A : A >U : U @@ -106,21 +106,21 @@ function foo2(x: T, y: U, z: V): V { return z; } //function foo2(x: T, y: U, z: V): V { return z; } foo(a, a, a); >foo(a, a, a) : A ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >a : A >a : A >a : A foo(a, b, c); >foo(a, b, c) : C ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >a : A >b : B >c : C foo(b, b, { foo: 1, bar: '', hm: '' }); >foo(b, b, { foo: 1, bar: '', hm: '' }) : { foo: number; bar: string; hm: string; } ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >b : B >b : B >{ foo: 1, bar: '', hm: '' } : { foo: number; bar: string; hm: string; } diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.types b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.types index 283b6e43205..fdd66ebf435 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.types +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.types @@ -29,7 +29,7 @@ var c: C; >C : C function foo(x: T, y: U, z: V): V { return z; } ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >T : T >U : U >V : V @@ -46,11 +46,11 @@ function foo(x: T, y: U, z: V): V { return z; } foo(1, 2, ''); >foo(1, 2, '') : string ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: 2, z: true }); >foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: 2, z: true }) : { x: number; y: number; z: boolean; } ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >{ x: 1 } : { x: number; } >x : number >{ x: 1, y: '' } : { x: number; y: string; } @@ -63,14 +63,14 @@ foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: 2, z: true }); foo(a, b, a); >foo(a, b, a) : A ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >a : A >b : B >a : A foo(a, { foo: 1, bar: '', hm: true }, b); >foo(a, { foo: 1, bar: '', hm: true }, b) : B ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >a : A >{ foo: 1, bar: '', hm: true } : { foo: number; bar: string; hm: boolean; } >foo : number @@ -80,7 +80,7 @@ foo(a, { foo: 1, bar: '', hm: true }, b); foo((x: number, y: string) => { }, (x, y: boolean) => { }, () => { }); >foo((x: number, y: string) => { }, (x, y: boolean) => { }, () => { }) : () => void ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >(x: number, y: string) => { } : (x: number, y: string) => void >x : number >y : string @@ -90,7 +90,7 @@ foo((x: number, y: string) => { }, (x, y: boolean) => { }, () => { }); >() => { } : () => void function foo2(x: T, y: U, z: V): V { return z; } ->foo2 : typeof foo2 +>foo2 : (x: T, y: U, z: V) => V >T : T >A : A >U : U @@ -109,14 +109,14 @@ function foo2(x: T, y: U, z: V): V { retu //function foo2(x: T, y: U, z: V): V { return z; } foo(b, a, c); >foo(b, a, c) : C ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >b : B >a : A >c : C foo(c, c, a); >foo(c, c, a) : A ->foo : typeof foo +>foo : (x: T, y: U, z: V) => V >c : C >c : C >a : A diff --git a/tests/baselines/reference/typeParametersAreIdenticalToThemselves.types b/tests/baselines/reference/typeParametersAreIdenticalToThemselves.types index 52b5754854a..345914d41bf 100644 --- a/tests/baselines/reference/typeParametersAreIdenticalToThemselves.types +++ b/tests/baselines/reference/typeParametersAreIdenticalToThemselves.types @@ -2,46 +2,46 @@ // type parameters from the same declaration are identical to themself function foo1(x: T); ->foo1 : typeof foo1 +>foo1 : { (x: T): any; (x: T): any; } >T : T >x : T >T : T function foo1(x: T); // no error, different declaration for each T ->foo1 : typeof foo1 +>foo1 : { (x: T): any; (x: T): any; } >T : T >x : T >T : T function foo1(x: T) { } ->foo1 : typeof foo1 +>foo1 : { (x: T): any; (x: T): any; } >T : T >x : T >T : T function foo2(x: T); ->foo2 : typeof foo2 +>foo2 : { (x: T): any; (x: T): any; } >T : T >U : U >x : T >T : T function foo2(x: T); // no error, different declaration for each T ->foo2 : typeof foo2 +>foo2 : { (x: T): any; (x: T): any; } >T : T >U : U >x : T >T : T function foo2(x: T) { } ->foo2 : typeof foo2 +>foo2 : { (x: T): any; (x: T): any; } >T : T >U : U >x : T >T : T function foo3(x: T, y: U) { ->foo3 : typeof foo3 +>foo3 : (x: T, y: U) => void >T : T >U : U >x : T diff --git a/tests/baselines/reference/typeParametersAvailableInNestedScope2.types b/tests/baselines/reference/typeParametersAvailableInNestedScope2.types index 70b0aa8b691..e5aa4282fbd 100644 --- a/tests/baselines/reference/typeParametersAvailableInNestedScope2.types +++ b/tests/baselines/reference/typeParametersAvailableInNestedScope2.types @@ -1,6 +1,6 @@ === tests/cases/conformance/types/typeParameters/typeParameterLists/typeParametersAvailableInNestedScope2.ts === function foo(x: T, y: U) { ->foo : typeof foo +>foo : (x: T, y: U) => void >T : T >U : U >x : T diff --git a/tests/baselines/reference/typeofOperatorWithBooleanType.types b/tests/baselines/reference/typeofOperatorWithBooleanType.types index bd41639c0a1..74df383985a 100644 --- a/tests/baselines/reference/typeofOperatorWithBooleanType.types +++ b/tests/baselines/reference/typeofOperatorWithBooleanType.types @@ -4,7 +4,7 @@ var BOOLEAN: boolean; >BOOLEAN : boolean function foo(): boolean { return true; } ->foo : typeof foo +>foo : () => boolean class A { >A : A @@ -64,7 +64,7 @@ var ResultIsString6 = typeof foo(); >ResultIsString6 : string >typeof foo() : string >foo() : boolean ->foo : typeof foo +>foo : () => boolean var ResultIsString7 = typeof A.foo(); >ResultIsString7 : string @@ -92,7 +92,7 @@ typeof BOOLEAN; typeof foo(); >typeof foo() : string >foo() : boolean ->foo : typeof foo +>foo : () => boolean typeof true, false; >typeof true, false : boolean @@ -126,7 +126,7 @@ z: typeof BOOLEAN; r: typeof foo; >typeof foo : string ->foo : typeof foo +>foo : () => boolean var y = { a: true, b: false}; >y : { a: boolean; b: boolean; } diff --git a/tests/baselines/reference/typeofOperatorWithNumberType.types b/tests/baselines/reference/typeofOperatorWithNumberType.types index e3a2794edbe..43d798d4c8e 100644 --- a/tests/baselines/reference/typeofOperatorWithNumberType.types +++ b/tests/baselines/reference/typeofOperatorWithNumberType.types @@ -8,7 +8,7 @@ var NUMBER1: number[] = [1, 2]; >[1, 2] : number[] function foo(): number { return 1; } ->foo : typeof foo +>foo : () => number class A { >A : A @@ -89,7 +89,7 @@ var ResultIsString9 = typeof foo(); >ResultIsString9 : string >typeof foo() : string >foo() : number ->foo : typeof foo +>foo : () => number var ResultIsString10 = typeof A.foo(); >ResultIsString10 : string @@ -139,7 +139,7 @@ typeof NUMBER1; typeof foo(); >typeof foo() : string >foo() : number ->foo : typeof foo +>foo : () => number typeof objA.a; >typeof objA.a : string @@ -180,7 +180,7 @@ x: typeof NUMBER1; r: typeof foo; >typeof foo : string ->foo : typeof foo +>foo : () => number var y = { a: 1, b: 2 }; >y : { a: number; b: number; } diff --git a/tests/baselines/reference/typeofOperatorWithStringType.types b/tests/baselines/reference/typeofOperatorWithStringType.types index dff0676b82e..fe63bc4cd36 100644 --- a/tests/baselines/reference/typeofOperatorWithStringType.types +++ b/tests/baselines/reference/typeofOperatorWithStringType.types @@ -8,7 +8,7 @@ var STRING1: string[] = ["", "abc"]; >["", "abc"] : string[] function foo(): string { return "abc"; } ->foo : typeof foo +>foo : () => string class A { >A : A @@ -89,7 +89,7 @@ var ResultIsString9 = typeof foo(); >ResultIsString9 : string >typeof foo() : string >foo() : string ->foo : typeof foo +>foo : () => string var ResultIsString10 = typeof A.foo(); >ResultIsString10 : string @@ -147,7 +147,7 @@ typeof STRING1; typeof foo(); >typeof foo() : string >foo() : string ->foo : typeof foo +>foo : () => string typeof objA.a, M.n; >typeof objA.a, M.n : string @@ -179,7 +179,7 @@ x: typeof STRING1; r: typeof foo; >typeof foo : string ->foo : typeof foo +>foo : () => string var y = { a: "", b: "" }; >y : { a: string; b: string; } diff --git a/tests/baselines/reference/uncaughtCompilerError1.types b/tests/baselines/reference/uncaughtCompilerError1.types index b017471e569..1300915a803 100644 --- a/tests/baselines/reference/uncaughtCompilerError1.types +++ b/tests/baselines/reference/uncaughtCompilerError1.types @@ -6,7 +6,7 @@ declare var index, lineTokens, token, tokens; >tokens : any function f() { ->f : typeof f +>f : () => { appendText: string; advanceCount: number; } if (lineTokens[index].trim() === '=' && index > 0 && token.type === '' && tokens[index - 1].type === 'attribute.name.html') { >lineTokens[index].trim() === '=' && index > 0 && token.type === '' && tokens[index - 1].type === 'attribute.name.html' : boolean diff --git a/tests/baselines/reference/undefinedArgumentInference.types b/tests/baselines/reference/undefinedArgumentInference.types index 463b3fca1fa..e6c50461aeb 100644 --- a/tests/baselines/reference/undefinedArgumentInference.types +++ b/tests/baselines/reference/undefinedArgumentInference.types @@ -1,6 +1,6 @@ === tests/cases/compiler/undefinedArgumentInference.ts === function foo1(f1: { x: T; y: T }): T { ->foo1 : typeof foo1 +>foo1 : (f1: { x: T; y: T; }) => T >T : T >f1 : { x: T; y: T; } >x : T @@ -17,7 +17,7 @@ function foo1(f1: { x: T; y: T }): T { var z1 = foo1({ x: undefined, y: undefined }); >z1 : any >foo1({ x: undefined, y: undefined }) : any ->foo1 : typeof foo1 +>foo1 : (f1: { x: T; y: T; }) => T >{ x: undefined, y: undefined } : { x: undefined; y: undefined; } >x : any >undefined : undefined diff --git a/tests/baselines/reference/undefinedAssignableToEveryType.types b/tests/baselines/reference/undefinedAssignableToEveryType.types index 1037b96976f..a32af9cd58f 100644 --- a/tests/baselines/reference/undefinedAssignableToEveryType.types +++ b/tests/baselines/reference/undefinedAssignableToEveryType.types @@ -118,7 +118,7 @@ var q: String = undefined; >undefined : undefined function foo(x: T, y: U, z: V) { ->foo : typeof foo +>foo : (x: T, y: U, z: V) => void >T : T >U : U >V : V diff --git a/tests/baselines/reference/undefinedInferentialTyping.types b/tests/baselines/reference/undefinedInferentialTyping.types index 881ced0fb90..b5741e4d40f 100644 --- a/tests/baselines/reference/undefinedInferentialTyping.types +++ b/tests/baselines/reference/undefinedInferentialTyping.types @@ -1,6 +1,6 @@ === tests/cases/compiler/undefinedInferentialTyping.ts === function f(arr: T[], elemnt: T): T { ->f : typeof f +>f : (arr: T[], elemnt: T) => T >T : T >arr : T[] >T : T @@ -14,6 +14,6 @@ function f(arr: T[], elemnt: T): T { var a = f([], 3); // should be number >a : number >f([], 3) : number ->f : typeof f +>f : (arr: T[], elemnt: T) => T >[] : number[] diff --git a/tests/baselines/reference/underscoreMapFirst.types b/tests/baselines/reference/underscoreMapFirst.types index c15e0ac37d3..52761647164 100644 --- a/tests/baselines/reference/underscoreMapFirst.types +++ b/tests/baselines/reference/underscoreMapFirst.types @@ -45,7 +45,7 @@ declare module _ { >T : T } export function pluck( ->pluck : typeof pluck +>pluck : (list: Collection, propertyName: string) => any[] >T : T list: Collection, @@ -57,7 +57,7 @@ declare module _ { >propertyName : string export function map( ->map : typeof map +>map : (list: List, iterator: ListIterator, context?: any) => TResult[] >T : T >TResult : TResult @@ -77,7 +77,7 @@ declare module _ { >TResult : TResult export function first(array: List): T; ->first : typeof first +>first : (array: List) => T >T : T >array : List >List : List @@ -132,20 +132,20 @@ class MyView extends View { >allSeries : ISeries[][] >ISeries : ISeries >_.pluck(data, "series") : any[] ->_.pluck : typeof _.pluck +>_.pluck : (list: _.Collection, propertyName: string) => any[] >_ : typeof _ ->pluck : typeof _.pluck +>pluck : (list: _.Collection, propertyName: string) => any[] >data : IData[] return _.map(allSeries, _.first); >_.map(allSeries, _.first) : ISeries[] ->_.map : typeof _.map +>_.map : (list: _.List, iterator: _.ListIterator, context?: any) => TResult[] >_ : typeof _ ->map : typeof _.map +>map : (list: _.List, iterator: _.ListIterator, context?: any) => TResult[] >allSeries : ISeries[][] ->_.first : typeof _.first +>_.first : (array: _.List) => T >_ : typeof _ ->first : typeof _.first +>first : (array: _.List) => T } } diff --git a/tests/baselines/reference/underscoreTest1.types b/tests/baselines/reference/underscoreTest1.types index 488d01b9f35..15cf42b9c7b 100644 --- a/tests/baselines/reference/underscoreTest1.types +++ b/tests/baselines/reference/underscoreTest1.types @@ -5,7 +5,7 @@ declare var $; >$ : any declare function alert(x: string): void; ->alert : typeof alert +>alert : (x: string) => void >x : string _.each([1, 2, 3], (num) => alert(num.toString())); @@ -17,7 +17,7 @@ _.each([1, 2, 3], (num) => alert(num.toString())); >(num) => alert(num.toString()) : (num: number) => void >num : number >alert(num.toString()) : void ->alert : typeof alert +>alert : (x: string) => void >num.toString() : string >num.toString : (radix?: number) => string >num : number @@ -36,7 +36,7 @@ _.each({ one: 1, two: 2, three: 3 }, (value: number, key?: string) => alert(valu >value : number >key : string >alert(value.toString()) : void ->alert : typeof alert +>alert : (x: string) => void >value.toString() : string >value.toString : (radix?: number) => string >value : number @@ -566,7 +566,7 @@ var buttonView = { >onClick : () => void >function () { alert('clicked: ' + this.label); } : () => void >alert('clicked: ' + this.label) : void ->alert : typeof alert +>alert : (x: string) => void >'clicked: ' + this.label : string >this.label : any >this : any @@ -576,7 +576,7 @@ var buttonView = { >onHover : () => void >function () { alert('hovering: ' + this.label); } : () => void >alert('hovering: ' + this.label) : void ->alert : typeof alert +>alert : (x: string) => void >'hovering: ' + this.label : string >this.label : any >this : any @@ -651,13 +651,13 @@ _.defer(function () { alert('deferred'); }); >defer : (func: Function, ...args: any[]) => number >function () { alert('deferred'); } : () => void >alert('deferred') : void ->alert : typeof alert +>alert : (x: string) => void var updatePosition = () => alert('updating position...'); >updatePosition : () => void >() => alert('updating position...') : () => void >alert('updating position...') : void ->alert : typeof alert +>alert : (x: string) => void var throttled = _.throttle(updatePosition, 100); >throttled : () => void @@ -679,7 +679,7 @@ var calculateLayout = () => alert('calculating layout...'); >calculateLayout : () => void >() => alert('calculating layout...') : () => void >alert('calculating layout...') : void ->alert : typeof alert +>alert : (x: string) => void var lazyLayout = _.debounce(calculateLayout, 300); >lazyLayout : () => void @@ -701,7 +701,7 @@ var createApplication = () => alert('creating application...'); >createApplication : () => void >() => alert('creating application...') : () => void >alert('creating application...') : void ->alert : typeof alert +>alert : (x: string) => void var initialize = _.once(createApplication); >initialize : () => void @@ -726,7 +726,7 @@ var render = () => alert("rendering..."); >render : () => void >() => alert("rendering...") : () => void >alert("rendering...") : void ->alert : typeof alert +>alert : (x: string) => void var renderNotes = _.after(notes.length, render); >renderNotes : () => void @@ -938,7 +938,7 @@ _.chain([1, 2, 3, 200]) .tap(alert) >tap : (interceptor: (object: number[]) => void) => Underscore.ChainedArray >alert : any ->alert : typeof alert +>alert : (x: string) => void .map(function (num) { return num * num }) >map : (iterator: Iterator, context?: any) => Underscore.ChainedArray @@ -1055,7 +1055,7 @@ _.isFunction(alert); >_.isFunction : (object: any) => boolean >_ : Underscore.Static >isFunction : (object: any) => boolean ->alert : typeof alert +>alert : (x: string) => void _.isString("moe"); >_.isString("moe") : boolean @@ -1114,7 +1114,7 @@ _.isNaN(NaN); isNaN(undefined); >isNaN(undefined) : boolean ->isNaN : typeof isNaN +>isNaN : (number: number) => boolean >undefined : undefined _.isNaN(undefined); diff --git a/tests/baselines/reference/untypedArgumentInLambdaExpression.types b/tests/baselines/reference/untypedArgumentInLambdaExpression.types index f400a0525c9..9d12a4f9fbf 100644 --- a/tests/baselines/reference/untypedArgumentInLambdaExpression.types +++ b/tests/baselines/reference/untypedArgumentInLambdaExpression.types @@ -1,12 +1,12 @@ === tests/cases/compiler/untypedArgumentInLambdaExpression.ts === declare function f(fn: (a: string) => string); ->f : typeof f +>f : (fn: (a: string) => string) => any >fn : (a: string) => string >a : string f((input): string => { >f((input): string => { return "." + input;}) : any ->f : typeof f +>f : (fn: (a: string) => string) => any >(input): string => { return "." + input;} : (input: string) => string >input : string diff --git a/tests/baselines/reference/unusedImportDeclaration.types b/tests/baselines/reference/unusedImportDeclaration.types index b8281684a5d..b15ebbf3242 100644 --- a/tests/baselines/reference/unusedImportDeclaration.types +++ b/tests/baselines/reference/unusedImportDeclaration.types @@ -12,12 +12,12 @@ var thingy: B = { }; declare function foo(a: string): void; ->foo : typeof foo +>foo : (a: string) => void >a : string foo("IN " + thingy.me + "!"); >foo("IN " + thingy.me + "!") : void ->foo : typeof foo +>foo : (a: string) => void >"IN " + thingy.me + "!" : string >"IN " + thingy.me : string >thingy.me : string diff --git a/tests/baselines/reference/validMultipleVariableDeclarations.types b/tests/baselines/reference/validMultipleVariableDeclarations.types index 60e7cebb491..0e25906aac4 100644 --- a/tests/baselines/reference/validMultipleVariableDeclarations.types +++ b/tests/baselines/reference/validMultipleVariableDeclarations.types @@ -21,7 +21,7 @@ var x = undefined; // new declaration space, making redeclaring x as a string valid function declSpace() { ->declSpace : typeof declSpace +>declSpace : () => void var x = 'this is a string'; >x : string diff --git a/tests/baselines/reference/validUndefinedAssignments.types b/tests/baselines/reference/validUndefinedAssignments.types index 84e9848c5b9..b48b6072e34 100644 --- a/tests/baselines/reference/validUndefinedAssignments.types +++ b/tests/baselines/reference/validUndefinedAssignments.types @@ -61,7 +61,7 @@ var h: { f(): void } = x; >x : any function i(a: T) { ->i : typeof i +>i : (a: T) => void >T : T >a : T >T : T diff --git a/tests/baselines/reference/varArgParamTypeCheck.types b/tests/baselines/reference/varArgParamTypeCheck.types index bd342bb79d9..1b5b20adbec 100644 --- a/tests/baselines/reference/varArgParamTypeCheck.types +++ b/tests/baselines/reference/varArgParamTypeCheck.types @@ -1,17 +1,17 @@ === tests/cases/compiler/varArgParamTypeCheck.ts === function sequence(...sequences:{():void;}[]) { ->sequence : typeof sequence +>sequence : (...sequences: { (): void; }[]) => void >sequences : { (): void; }[] } function callback(clb:()=>void) { ->callback : typeof callback +>callback : (clb: () => void) => void >clb : () => void } sequence( >sequence( function bar() { }, function foo() { callback(()=>{ this(); }); }, function baz() { callback(()=>{ this(); }); }) : void ->sequence : typeof sequence +>sequence : (...sequences: { (): void; }[]) => void function bar() { >function bar() { } : () => void @@ -24,7 +24,7 @@ sequence( callback(()=>{ >callback(()=>{ this(); }) : void ->callback : typeof callback +>callback : (clb: () => void) => void >()=>{ this(); } : () => void this(); @@ -39,7 +39,7 @@ sequence( callback(()=>{ >callback(()=>{ this(); }) : void ->callback : typeof callback +>callback : (clb: () => void) => void >()=>{ this(); } : () => void this(); diff --git a/tests/baselines/reference/vardecl.types b/tests/baselines/reference/vardecl.types index 714a721602e..f757562c103 100644 --- a/tests/baselines/reference/vardecl.types +++ b/tests/baselines/reference/vardecl.types @@ -220,7 +220,7 @@ var z; >z : any function foo(a2) { ->foo : typeof foo +>foo : (a2: any) => void >a2 : any var a = 10; diff --git a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.types b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.types index a275b3cbc23..112c9c87f23 100644 --- a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.types +++ b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.types @@ -3,7 +3,7 @@ import commands = require('visibilityOfCrossModuleTypeUsage_commands'); >commands : typeof commands function run(configuration: commands.IConfiguration) { ->run : typeof run +>run : (configuration: commands.IConfiguration) => void >configuration : commands.IConfiguration >commands : unknown >IConfiguration : commands.IConfiguration diff --git a/tests/baselines/reference/voidFunctionAssignmentCompat.types b/tests/baselines/reference/voidFunctionAssignmentCompat.types index 8da295f13bc..86e69c278c8 100644 --- a/tests/baselines/reference/voidFunctionAssignmentCompat.types +++ b/tests/baselines/reference/voidFunctionAssignmentCompat.types @@ -18,7 +18,7 @@ fv = function() { return 0; } // should work >function() { return 0; } : () => number function execAny(callback:(val:any)=>any) { return callback(0) } ->execAny : typeof execAny +>execAny : (callback: (val: any) => any) => any >callback : (val: any) => any >val : any >callback(0) : any @@ -26,11 +26,11 @@ function execAny(callback:(val:any)=>any) { return callback(0) } execAny(function () {}); // should work >execAny(function () {}) : any ->execAny : typeof execAny +>execAny : (callback: (val: any) => any) => any >function () {} : () => void function execVoid(callback:(val:any)=>void) { callback(0); } ->execVoid : typeof execVoid +>execVoid : (callback: (val: any) => void) => void >callback : (val: any) => void >val : any >callback(0) : void @@ -38,7 +38,7 @@ function execVoid(callback:(val:any)=>void) { callback(0); } execVoid(function () {return 0;}); // should work >execVoid(function () {return 0;}) : void ->execVoid : typeof execVoid +>execVoid : (callback: (val: any) => void) => void >function () {return 0;} : () => number var fra: (v:any)=>any = function() { return function () {}; } // should work diff --git a/tests/baselines/reference/voidOperatorWithBooleanType.types b/tests/baselines/reference/voidOperatorWithBooleanType.types index 393228a9766..88859c20378 100644 --- a/tests/baselines/reference/voidOperatorWithBooleanType.types +++ b/tests/baselines/reference/voidOperatorWithBooleanType.types @@ -4,7 +4,7 @@ var BOOLEAN: boolean; >BOOLEAN : boolean function foo(): boolean { return true; } ->foo : typeof foo +>foo : () => boolean class A { >A : A @@ -64,7 +64,7 @@ var ResultIsAny6 = void foo(); >ResultIsAny6 : any >void foo() : undefined >foo() : boolean ->foo : typeof foo +>foo : () => boolean var ResultIsAny7 = void A.foo(); >ResultIsAny7 : any @@ -92,7 +92,7 @@ void BOOLEAN; void foo(); >void foo() : undefined >foo() : boolean ->foo : typeof foo +>foo : () => boolean void true, false; >void true, false : boolean diff --git a/tests/baselines/reference/voidOperatorWithNumberType.types b/tests/baselines/reference/voidOperatorWithNumberType.types index 44ea71937cd..5669709e24b 100644 --- a/tests/baselines/reference/voidOperatorWithNumberType.types +++ b/tests/baselines/reference/voidOperatorWithNumberType.types @@ -8,7 +8,7 @@ var NUMBER1: number[] = [1, 2]; >[1, 2] : number[] function foo(): number { return 1; } ->foo : typeof foo +>foo : () => number class A { >A : A @@ -89,7 +89,7 @@ var ResultIsAny9 = void foo(); >ResultIsAny9 : any >void foo() : undefined >foo() : number ->foo : typeof foo +>foo : () => number var ResultIsAny10 = void A.foo(); >ResultIsAny10 : any @@ -139,7 +139,7 @@ void NUMBER1; void foo(); >void foo() : undefined >foo() : number ->foo : typeof foo +>foo : () => number void objA.a; >void objA.a : undefined diff --git a/tests/baselines/reference/voidOperatorWithStringType.types b/tests/baselines/reference/voidOperatorWithStringType.types index 0aa7ef8ffb0..cb2dc7cb490 100644 --- a/tests/baselines/reference/voidOperatorWithStringType.types +++ b/tests/baselines/reference/voidOperatorWithStringType.types @@ -8,7 +8,7 @@ var STRING1: string[] = ["", "abc"]; >["", "abc"] : string[] function foo(): string { return "abc"; } ->foo : typeof foo +>foo : () => string class A { >A : A @@ -89,7 +89,7 @@ var ResultIsAny9 = void foo(); >ResultIsAny9 : any >void foo() : undefined >foo() : string ->foo : typeof foo +>foo : () => string var ResultIsAny10 = void A.foo(); >ResultIsAny10 : any @@ -147,7 +147,7 @@ void STRING1; void foo(); >void foo() : undefined >foo() : string ->foo : typeof foo +>foo : () => string void objA.a,M.n; >void objA.a,M.n : string diff --git a/tests/baselines/reference/voidReturnLambdaValue.types b/tests/baselines/reference/voidReturnLambdaValue.types index 70ba206c6e1..0e524460a0c 100644 --- a/tests/baselines/reference/voidReturnLambdaValue.types +++ b/tests/baselines/reference/voidReturnLambdaValue.types @@ -1,6 +1,6 @@ === tests/cases/compiler/voidReturnLambdaValue.ts === function foo(arg1, arg2, callback:(v1,v2,v3) => void):void { ->foo : typeof foo +>foo : (arg1: any, arg2: any, callback: (v1: any, v2: any, v3: any) => void) => void >arg1 : any >arg2 : any >callback : (v1: any, v2: any, v3: any) => void diff --git a/tests/baselines/reference/withImportDecl.types b/tests/baselines/reference/withImportDecl.types index 0228d6a16ac..02236436dee 100644 --- a/tests/baselines/reference/withImportDecl.types +++ b/tests/baselines/reference/withImportDecl.types @@ -40,7 +40,7 @@ var arrayVar: string[] = ['a', 'b']; function simpleFunction() { ->simpleFunction : typeof simpleFunction +>simpleFunction : () => { x: string; y: string; n: number; } return { >{ x: "Hello", y: "word", n: 2 } : { x: string; y: string; n: number; } @@ -61,7 +61,7 @@ module m1 { >m1 : typeof m1 export function foo() { ->foo : typeof foo +>foo : () => string return "Hello"; }