Skip to content

Commit 44c2453

Browse files
committed
Don't use UseTypeOfFunction in typeWriter
1 parent 46825ab commit 44c2453

File tree

468 files changed

+4147
-4147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

468 files changed

+4147
-4147
lines changed

src/harness/typeWriter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class TypeWriterWalker {
8686
column: lineAndCharacter.character,
8787
syntaxKind: ts.SyntaxKind[node.kind],
8888
sourceText: sourceText,
89-
type: this.checker.typeToString(type, node.parent, ts.TypeFormatFlags.UseTypeOfFunction)
89+
type: this.checker.typeToString(type, node.parent, ts.TypeFormatFlags.None)
9090
});
9191
}
9292

tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module Point {
1818
>Point : typeof Point
1919

2020
function Origin() { return ""; }// not an error, since not exported
21-
>Origin : typeof Origin
21+
>Origin : () => string
2222
}
2323

2424

@@ -44,6 +44,6 @@ module A {
4444
>Point : typeof Point
4545

4646
function Origin() { return ""; }// not an error since not exported
47-
>Origin : typeof Origin
47+
>Origin : () => string
4848
}
4949
}

tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module A {
2323
}
2424

2525
export function fromOrigin(p: Point): Line {
26-
>fromOrigin : typeof fromOrigin
26+
>fromOrigin : (p: Point) => Line
2727
>p : Point
2828
>Point : Point
2929
>Line : Line

tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module A {
2323
}
2424

2525
export function fromOrigin(p: Point): Line {
26-
>fromOrigin : typeof fromOrigin
26+
>fromOrigin : (p: Point) => Line
2727
>p : Point
2828
>Point : Point
2929
>Line : Line

tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module A {
2323
}
2424

2525
export function fromOrigin(p: Point): Line {
26-
>fromOrigin : typeof fromOrigin
26+
>fromOrigin : (p: Point) => Line
2727
>p : Point
2828
>Point : Point
2929
>Line : Line

tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module A {
33
>A : typeof A
44

55
export function Point() {
6-
>Point : typeof Point
6+
>Point : () => { x: number; y: number; }
77

88
return { x: 0, y: 0 };
99
>{ x: 0, y: 0 } : { x: number; y: number; }
@@ -35,9 +35,9 @@ var fn: () => { x: number; y: number };
3535

3636
var fn = A.Point;
3737
>fn : () => { x: number; y: number; }
38-
>A.Point : typeof A.Point
38+
>A.Point : () => { x: number; y: number; }
3939
>A : typeof A
40-
>Point : typeof A.Point
40+
>Point : () => { x: number; y: number; }
4141

4242
var cl: { x: number; y: number; }
4343
>cl : { x: number; y: number; }

tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module A {
1616
>Utils : typeof Utils
1717

1818
export function mirror<T extends Point>(p: T) {
19-
>mirror : typeof mirror
19+
>mirror : <T extends Point>(p: T) => { x: number; y: number; }
2020
>T : T
2121
>Point : Point
2222
>p : T
@@ -87,11 +87,11 @@ var o = A.Origin;
8787
var o = A.Utils.mirror(o);
8888
>o : { x: number; y: number; }
8989
>A.Utils.mirror(o) : { x: number; y: number; }
90-
>A.Utils.mirror : typeof A.Utils.mirror
90+
>A.Utils.mirror : <T extends A.Point>(p: T) => { x: number; y: number; }
9191
>A.Utils : typeof A.Utils
9292
>A : typeof A
9393
>Utils : typeof A.Utils
94-
>mirror : typeof A.Utils.mirror
94+
>mirror : <T extends A.Point>(p: T) => { x: number; y: number; }
9595
>o : { x: number; y: number; }
9696

9797
var p: { tl: A.Point; br: A.Point };

tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module Root {
1919
>Utils : typeof Utils
2020

2121
export function mirror<T extends Point>(p: T) {
22-
>mirror : typeof mirror
22+
>mirror : <T extends Point>(p: T) => { x: number; y: number; }
2323
>T : T
2424
>Point : Point
2525
>p : T

tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module A {
1616
>Utils : typeof Utils
1717

1818
export function mirror<T extends Point>(p: T) {
19-
>mirror : typeof mirror
19+
>mirror : <T extends Point>(p: T) => { x: number; y: number; }
2020
>T : T
2121
>Point : Point
2222
>p : T
@@ -84,11 +84,11 @@ var o = A.Origin;
8484
var o = A.Utils.mirror(o);
8585
>o : { x: number; y: number; }
8686
>A.Utils.mirror(o) : { x: number; y: number; }
87-
>A.Utils.mirror : typeof A.Utils.mirror
87+
>A.Utils.mirror : <T extends A.Point>(p: T) => { x: number; y: number; }
8888
>A.Utils : typeof A.Utils
8989
>A : typeof A
9090
>Utils : typeof A.Utils
91-
>mirror : typeof A.Utils.mirror
91+
>mirror : <T extends A.Point>(p: T) => { x: number; y: number; }
9292
>o : { x: number; y: number; }
9393

9494
var p: { tl: A.Point; br: A.Point };

tests/baselines/reference/additionOperatorWithAnyAndEveryType.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithAnyAndEveryType.ts ===
22
function foo() { }
3-
>foo : typeof foo
3+
>foo : () => void
44

55
class C {
66
>C : C
@@ -98,14 +98,14 @@ var r10 = a + foo;
9898
>r10 : any
9999
>a + foo : any
100100
>a : any
101-
>foo : typeof foo
101+
>foo : () => void
102102

103103
var r11 = a + foo();
104104
>r11 : any
105105
>a + foo() : any
106106
>a : any
107107
>foo() : void
108-
>foo : typeof foo
108+
>foo : () => void
109109

110110
var r12 = a + C;
111111
>r12 : any

0 commit comments

Comments
 (0)