Skip to content

Commit f89a5fd

Browse files
authored
Replace addUndefined in serializeTypeForDeclaration with the actual declaration (microsoft#58085)
1 parent 066773b commit f89a5fd

File tree

2,867 files changed

+31191
-31066
lines changed

Some content is hidden

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

2,867 files changed

+31191
-31066
lines changed

src/compiler/checker.ts

Lines changed: 93 additions & 35 deletions
Large diffs are not rendered by default.

src/compiler/transformers/declarations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ export function transformDeclarations(context: TransformationContext) {
638638
case SyntaxKind.PropertyDeclaration:
639639
case SyntaxKind.BindingElement:
640640
case SyntaxKind.VariableDeclaration:
641-
typeNode = resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldAddImplicitUndefined);
641+
typeNode = resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
642642
break;
643643
case SyntaxKind.FunctionDeclaration:
644644
case SyntaxKind.ConstructSignature:

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5653,7 +5653,7 @@ export interface EmitResolver {
56535653
requiresAddingImplicitUndefined(node: ParameterDeclaration): boolean;
56545654
isExpandoFunctionDeclaration(node: FunctionDeclaration): boolean;
56555655
getPropertiesOfContainerFunction(node: Declaration): Symbol[];
5656-
createTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression | ElementAccessExpression | BinaryExpression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker, addUndefined?: boolean): TypeNode | undefined;
5656+
createTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression | ElementAccessExpression | BinaryExpression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined;
56575657
createReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined;
56585658
createTypeOfExpression(expr: Expression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined;
56595659
createLiteralConstValue(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration, tracker: SymbolTracker): Expression;

tests/baselines/reference/1.0lib-noErrors.types

Lines changed: 25 additions & 25 deletions
Large diffs are not rendered by default.

tests/baselines/reference/2dArrays.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ class Board {
3535
>this.ships.every(function (val) { return val.isSunk; }) : boolean
3636
> : ^^^^^^^
3737
>this.ships.every : { <S extends Ship>(predicate: (value: Ship, index: number, array: Ship[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: Ship, index: number, array: Ship[]) => unknown, thisArg?: any): boolean; }
38-
> : ^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
38+
> : ^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^
3939
>this.ships : Ship[]
4040
> : ^^^^^^
4141
>this : this
4242
> : ^^^^
4343
>ships : Ship[]
4444
> : ^^^^^^
4545
>every : { <S extends Ship>(predicate: (value: Ship, index: number, array: Ship[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: Ship, index: number, array: Ship[]) => unknown, thisArg?: any): boolean; }
46-
> : ^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
46+
> : ^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^
4747
>function (val) { return val.isSunk; } : (val: Ship) => boolean
4848
> : ^ ^^^^^^^^^^^^^^^^^^
4949
>val : Ship

tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ module clodule {
3939
>clodule.sfn('a') : number
4040
> : ^^^^^^
4141
>clodule.sfn : (id: string) => number
42-
> : ^ ^^^^^^^^^^^^^^^^^^^
42+
> : ^ ^^ ^^^^^^^^^^^
4343
>clodule : typeof clodule
4444
> : ^^^^^^^^^^^^^^
4545
>sfn : (id: string) => number
46-
> : ^ ^^^^^^^^^^^^^^^^^^^
46+
> : ^ ^^ ^^^^^^^^^^^
4747
>'a' : "a"
4848
> : ^^^
4949
}

tests/baselines/reference/ES5For-of1.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ for (var v of ['a', 'b', 'c']) {
1717
>console.log(v) : void
1818
> : ^^^^
1919
>console.log : (...data: any[]) => void
20-
> : ^^^^ ^^^^^^^^^^^^^^^^
20+
> : ^^^^ ^^ ^^^^^^^^^
2121
>console : Console
2222
> : ^^^^^^^
2323
>log : (...data: any[]) => void
24-
> : ^^^^ ^^^^^^^^^^^^^^^^
24+
> : ^^^^ ^^ ^^^^^^^^^
2525
>v : string
2626
> : ^^^^^^
2727
}

tests/baselines/reference/ES5For-of22.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ for (var x of [1, 2, 3]) {
2323
>console.log(x) : void
2424
> : ^^^^
2525
>console.log : (...data: any[]) => void
26-
> : ^^^^ ^^^^^^^^^^^^^^^^
26+
> : ^^^^ ^^ ^^^^^^^^^
2727
>console : Console
2828
> : ^^^^^^^
2929
>log : (...data: any[]) => void
30-
> : ^^^^ ^^^^^^^^^^^^^^^^
30+
> : ^^^^ ^^ ^^^^^^^^^
3131
>x : number
3232
> : ^^^^^^
3333
}

tests/baselines/reference/ES5For-of23.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ for (var x of [1, 2, 3]) {
2323
>console.log(x) : void
2424
> : ^^^^
2525
>console.log : (...data: any[]) => void
26-
> : ^^^^ ^^^^^^^^^^^^^^^^
26+
> : ^^^^ ^^ ^^^^^^^^^
2727
>console : Console
2828
> : ^^^^^^^
2929
>log : (...data: any[]) => void
30-
> : ^^^^ ^^^^^^^^^^^^^^^^
30+
> : ^^^^ ^^ ^^^^^^^^^
3131
>x : number
3232
> : ^^^^^^
3333
}

tests/baselines/reference/ES5For-of33.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ for (var v of ['a', 'b', 'c']) {
1717
>console.log(v) : void
1818
> : ^^^^
1919
>console.log : (...data: any[]) => void
20-
> : ^^^^ ^^^^^^^^^^^^^^^^
20+
> : ^^^^ ^^ ^^^^^^^^^
2121
>console : Console
2222
> : ^^^^^^^
2323
>log : (...data: any[]) => void
24-
> : ^^^^ ^^^^^^^^^^^^^^^^
24+
> : ^^^^ ^^ ^^^^^^^^^
2525
>v : string
2626
> : ^^^^^^
2727
}

tests/baselines/reference/ES5For-of37.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ for (const i of [0, 1, 2, 3, 4]) {
5454
>console.log(i) : void
5555
> : ^^^^
5656
>console.log : (...data: any[]) => void
57-
> : ^^^^ ^^^^^^^^^^^^^^^^
57+
> : ^^^^ ^^ ^^^^^^^^^
5858
>console : Console
5959
> : ^^^^^^^
6060
>log : (...data: any[]) => void
61-
> : ^^^^ ^^^^^^^^^^^^^^^^
61+
> : ^^^^ ^^ ^^^^^^^^^
6262
>i : number
6363
> : ^^^^^^
6464

@@ -69,11 +69,11 @@ for (const i of [0, 1, 2, 3, 4]) {
6969
>console.log('E %s %s', i, err) : void
7070
> : ^^^^
7171
>console.log : (...data: any[]) => void
72-
> : ^^^^ ^^^^^^^^^^^^^^^^
72+
> : ^^^^ ^^ ^^^^^^^^^
7373
>console : Console
7474
> : ^^^^^^^
7575
>log : (...data: any[]) => void
76-
> : ^^^^ ^^^^^^^^^^^^^^^^
76+
> : ^^^^ ^^ ^^^^^^^^^
7777
>'E %s %s' : "E %s %s"
7878
> : ^^^^^^^^^
7979
>i : number

tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ var fn: (s: string) => boolean;
5555

5656
var fn = A.fn;
5757
>fn : (s: string) => boolean
58-
> : ^ ^^^^^^^^^^^^^^^^^^^^
58+
> : ^ ^^ ^^^^^^^^^^^^
5959
>A.fn : (s: string) => boolean
60-
> : ^ ^^^^^^^^^^^^^^^^^^^^
60+
> : ^ ^^ ^^^^^^^^^^^^
6161
>A : typeof A
6262
> : ^^^^^^^^
6363
>fn : (s: string) => boolean
64-
> : ^ ^^^^^^^^^^^^^^^^^^^^
64+
> : ^ ^^ ^^^^^^^^^^^^
6565

6666
var fng: <T, U>(s: T) => U;
6767
>fng : <T, U>(s: T) => U
@@ -71,13 +71,13 @@ var fng: <T, U>(s: T) => U;
7171

7272
var fng = A.fng; // bug 838015
7373
>fng : <T, U>(s: T) => U
74-
> : ^^^^^^^ ^^^^^^^^^
74+
> : ^ ^^^^^ ^^ ^^^^^^
7575
>A.fng : <T, U>(s: T) => U
76-
> : ^^^^^^^ ^^^^^^^^^
76+
> : ^ ^^^^^ ^^ ^^^^^^
7777
>A : typeof A
7878
> : ^^^^^^^^
7979
>fng : <T, U>(s: T) => U
80-
> : ^^^^^^^ ^^^^^^^^^
80+
> : ^ ^^^^^ ^^ ^^^^^^
8181

8282
// these should be errors since the functions are not exported
8383
var fn2 = A.fn2;

tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ var l: { new (s: A.Point, e: A.Point); }
9191

9292
var l: X.Y.Z.Line;
9393
>l : new (s: A.Point, e: A.Point) => any
94-
> : ^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
94+
> : ^^^^^ ^^ ^^ ^^ ^^^^^^^^
9595
>X : any
9696
> : ^^^
9797
>Y : any

tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ var o = A.Utils.mirror(o);
123123
>A.Utils.mirror(o) : { x: number; y: number; }
124124
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
125125
>A.Utils.mirror : <T extends A.Point>(p: T) => { x: number; y: number; }
126-
> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126+
> : ^ ^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127127
>A.Utils : typeof A.Utils
128128
> : ^^^^^^^^^^^^^^
129129
>A : typeof A
130130
> : ^^^^^^^^
131131
>Utils : typeof A.Utils
132132
> : ^^^^^^^^^^^^^^
133133
>mirror : <T extends A.Point>(p: T) => { x: number; y: number; }
134-
> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134+
> : ^ ^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
135135
>o : { x: number; y: number; }
136136
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
137137

tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ var l: { start: A.Point; end: A.Point; new (s: A.Point, e: A.Point); }
103103

104104
var l: X.Y.Z.Line;
105105
>l : { new (s: A.Point, e: A.Point): any; start: A.Point; end: A.Point; }
106-
> : ^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106+
> : ^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
107107
>X : any
108108
> : ^^^
109109
>Y : any

tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ var o = A.Utils.mirror(o);
117117
>A.Utils.mirror(o) : { x: number; y: number; }
118118
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
119119
>A.Utils.mirror : <T extends A.Point>(p: T) => { x: number; y: number; }
120-
> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120+
> : ^ ^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
121121
>A.Utils : typeof A.Utils
122122
> : ^^^^^^^^^^^^^^
123123
>A : typeof A
124124
> : ^^^^^^^^
125125
>Utils : typeof A.Utils
126126
> : ^^^^^^^^^^^^^^
127127
>mirror : <T extends A.Point>(p: T) => { x: number; y: number; }
128-
> : ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128+
> : ^ ^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
129129
>o : { x: number; y: number; }
130130
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
131131

tests/baselines/reference/abstractClassUnionInstantiation.types

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ new cls3(); // should work
7575
>[ConcreteA, AbstractA, AbstractB].map(cls => new cls()) : any[]
7676
> : ^^^^^
7777
>[ConcreteA, AbstractA, AbstractB].map : <U>(callbackfn: (value: typeof ConcreteA | typeof AbstractA | typeof AbstractB, index: number, array: (typeof ConcreteA | typeof AbstractA | typeof AbstractB)[]) => U, thisArg?: any) => U[]
78-
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
78+
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^
7979
>[ConcreteA, AbstractA, AbstractB] : (typeof ConcreteA | typeof AbstractA | typeof AbstractB)[]
8080
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8181
>ConcreteA : typeof ConcreteA
@@ -85,7 +85,7 @@ new cls3(); // should work
8585
>AbstractB : typeof AbstractB
8686
> : ^^^^^^^^^^^^^^^^
8787
>map : <U>(callbackfn: (value: typeof ConcreteA | typeof AbstractA | typeof AbstractB, index: number, array: (typeof ConcreteA | typeof AbstractA | typeof AbstractB)[]) => U, thisArg?: any) => U[]
88-
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
88+
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^
8989
>cls => new cls() : (cls: typeof ConcreteA | typeof AbstractA | typeof AbstractB) => any
9090
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9191
>cls : typeof ConcreteA | typeof AbstractA | typeof AbstractB
@@ -99,7 +99,7 @@ new cls3(); // should work
9999
>[AbstractA, AbstractB, ConcreteA].map(cls => new cls()) : any[]
100100
> : ^^^^^
101101
>[AbstractA, AbstractB, ConcreteA].map : <U>(callbackfn: (value: typeof ConcreteA | typeof AbstractA | typeof AbstractB, index: number, array: (typeof ConcreteA | typeof AbstractA | typeof AbstractB)[]) => U, thisArg?: any) => U[]
102-
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
102+
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^
103103
>[AbstractA, AbstractB, ConcreteA] : (typeof ConcreteA | typeof AbstractA | typeof AbstractB)[]
104104
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105105
>AbstractA : typeof AbstractA
@@ -109,7 +109,7 @@ new cls3(); // should work
109109
>ConcreteA : typeof ConcreteA
110110
> : ^^^^^^^^^^^^^^^^
111111
>map : <U>(callbackfn: (value: typeof ConcreteA | typeof AbstractA | typeof AbstractB, index: number, array: (typeof ConcreteA | typeof AbstractA | typeof AbstractB)[]) => U, thisArg?: any) => U[]
112-
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
112+
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^
113113
>cls => new cls() : (cls: typeof ConcreteA | typeof AbstractA | typeof AbstractB) => any
114114
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
115115
>cls : typeof ConcreteA | typeof AbstractA | typeof AbstractB
@@ -123,15 +123,15 @@ new cls3(); // should work
123123
>[ConcreteA, ConcreteB].map(cls => new cls()) : ConcreteA[]
124124
> : ^^^^^^^^^^^
125125
>[ConcreteA, ConcreteB].map : <U>(callbackfn: (value: typeof ConcreteA, index: number, array: (typeof ConcreteA)[]) => U, thisArg?: any) => U[]
126-
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
126+
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^
127127
>[ConcreteA, ConcreteB] : (typeof ConcreteA)[]
128128
> : ^^^^^^^^^^^^^^^^^^^^
129129
>ConcreteA : typeof ConcreteA
130130
> : ^^^^^^^^^^^^^^^^
131131
>ConcreteB : typeof ConcreteB
132132
> : ^^^^^^^^^^^^^^^^
133133
>map : <U>(callbackfn: (value: typeof ConcreteA, index: number, array: (typeof ConcreteA)[]) => U, thisArg?: any) => U[]
134-
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
134+
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^
135135
>cls => new cls() : (cls: typeof ConcreteA) => ConcreteA
136136
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137137
>cls : typeof ConcreteA
@@ -145,15 +145,15 @@ new cls3(); // should work
145145
>[AbstractA, AbstractB].map(cls => new cls()) : any[]
146146
> : ^^^^^
147147
>[AbstractA, AbstractB].map : <U>(callbackfn: (value: typeof AbstractA | typeof AbstractB, index: number, array: (typeof AbstractA | typeof AbstractB)[]) => U, thisArg?: any) => U[]
148-
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
148+
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^
149149
>[AbstractA, AbstractB] : (typeof AbstractA | typeof AbstractB)[]
150150
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
151151
>AbstractA : typeof AbstractA
152152
> : ^^^^^^^^^^^^^^^^
153153
>AbstractB : typeof AbstractB
154154
> : ^^^^^^^^^^^^^^^^
155155
>map : <U>(callbackfn: (value: typeof AbstractA | typeof AbstractB, index: number, array: (typeof AbstractA | typeof AbstractB)[]) => U, thisArg?: any) => U[]
156-
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
156+
> : ^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^
157157
>cls => new cls() : (cls: typeof AbstractA | typeof AbstractB) => any
158158
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
159159
>cls : typeof AbstractA | typeof AbstractB

tests/baselines/reference/abstractProperty(target=es2015).types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ abstract class A {
1717
>console.log(this.x) : void
1818
> : ^^^^
1919
>console.log : (...data: any[]) => void
20-
> : ^^^^ ^^^^^^^^^^^^^^^^
20+
> : ^^^^ ^^ ^^^^^^^^^
2121
>console : Console
2222
> : ^^^^^^^
2323
>log : (...data: any[]) => void
24-
> : ^^^^ ^^^^^^^^^^^^^^^^
24+
> : ^^^^ ^^ ^^^^^^^^^
2525
>this.x : string
2626
> : ^^^^^^
2727
>this : this

tests/baselines/reference/abstractProperty(target=esnext).types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ abstract class A {
1717
>console.log(this.x) : void
1818
> : ^^^^
1919
>console.log : (...data: any[]) => void
20-
> : ^^^^ ^^^^^^^^^^^^^^^^
20+
> : ^^^^ ^^ ^^^^^^^^^
2121
>console : Console
2222
> : ^^^^^^^
2323
>log : (...data: any[]) => void
24-
> : ^^^^ ^^^^^^^^^^^^^^^^
24+
> : ^^^^ ^^ ^^^^^^^^^
2525
>this.x : string
2626
> : ^^^^^^
2727
>this : this

0 commit comments

Comments
 (0)