Skip to content

Commit a0412da

Browse files
committed
Merge branch 'master' into fix19349
2 parents 9f1100c + fa3ce9f commit a0412da

25 files changed

+323
-104
lines changed

issue_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->
44

55
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
6-
**TypeScript Version:** 2.6.0-dev.201xxxxx
6+
**TypeScript Version:** 2.7.0-dev.201xxxxx
77

88
**Code**
99

src/compiler/checker.ts

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6726,6 +6726,16 @@ namespace ts {
67266726
isInJavaScriptFile(signature.declaration));
67276727
}
67286728

6729+
function getBaseSignature(signature: Signature) {
6730+
const typeParameters = signature.typeParameters;
6731+
if (typeParameters) {
6732+
const typeEraser = createTypeEraser(typeParameters);
6733+
const baseConstraints = map(typeParameters, tp => instantiateType(getBaseConstraintOfType(tp), typeEraser) || emptyObjectType);
6734+
return instantiateSignature(signature, createTypeMapper(typeParameters, baseConstraints), /*eraseTypeParameters*/ true);
6735+
}
6736+
return signature;
6737+
}
6738+
67296739
function getOrCreateTypeFromSignature(signature: Signature): ObjectType {
67306740
// There are two ways to declare a construct signature, one is by declaring a class constructor
67316741
// using the constructor keyword, and the other is declaring a bare construct signature in an
@@ -10955,7 +10965,7 @@ namespace ts {
1095510965
const targetLen = targetSignatures.length;
1095610966
const len = sourceLen < targetLen ? sourceLen : targetLen;
1095710967
for (let i = 0; i < len; i++) {
10958-
inferFromSignature(getErasedSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i]));
10968+
inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getBaseSignature(targetSignatures[targetLen - len + i]));
1095910969
}
1096010970
}
1096110971

@@ -13430,7 +13440,7 @@ namespace ts {
1343013440
// exists. Otherwise, it is the type of the string index signature in T, if one exists.
1343113441
function getContextualTypeForObjectLiteralMethod(node: MethodDeclaration): Type {
1343213442
Debug.assert(isObjectLiteralMethod(node));
13433-
if (isInsideWithStatementBody(node)) {
13443+
if (node.flags & NodeFlags.InWithStatement) {
1343413444
// We cannot answer semantic questions within a with block, do not proceed any further
1343513445
return undefined;
1343613446
}
@@ -13549,7 +13559,7 @@ namespace ts {
1354913559
* @returns the contextual type of an expression.
1355013560
*/
1355113561
function getContextualType(node: Expression): Type | undefined {
13552-
if (isInsideWithStatementBody(node)) {
13562+
if (node.flags & NodeFlags.InWithStatement) {
1355313563
// We cannot answer semantic questions within a with block, do not proceed any further
1355413564
return undefined;
1355513565
}
@@ -23114,21 +23124,8 @@ namespace ts {
2311423124

2311523125
// Language service support
2311623126

23117-
function isInsideWithStatementBody(node: Node): boolean {
23118-
if (node) {
23119-
while (node.parent) {
23120-
if (node.parent.kind === SyntaxKind.WithStatement && (<WithStatement>node.parent).statement === node) {
23121-
return true;
23122-
}
23123-
node = node.parent;
23124-
}
23125-
}
23126-
23127-
return false;
23128-
}
23129-
2313023127
function getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[] {
23131-
if (isInsideWithStatementBody(location)) {
23128+
if (location.flags & NodeFlags.InWithStatement) {
2313223129
// We cannot answer semantic questions within a with block, do not proceed any further
2313323130
return [];
2313423131
}
@@ -23428,7 +23425,7 @@ namespace ts {
2342823425
return isExternalModule(<SourceFile>node) ? getMergedSymbol(node.symbol) : undefined;
2342923426
}
2343023427

23431-
if (isInsideWithStatementBody(node)) {
23428+
if (node.flags & NodeFlags.InWithStatement) {
2343223429
// We cannot answer semantic questions within a with block, do not proceed any further
2343323430
return undefined;
2343423431
}
@@ -23536,7 +23533,7 @@ namespace ts {
2353623533
}
2353723534

2353823535
function getTypeOfNode(node: Node): Type {
23539-
if (isInsideWithStatementBody(node)) {
23536+
if (node.flags & NodeFlags.InWithStatement) {
2354023537
// We cannot answer semantic questions within a with block, do not proceed any further
2354123538
return unknownType;
2354223539
}

src/compiler/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4724,7 +4724,7 @@ namespace ts {
47244724
parseExpected(SyntaxKind.OpenParenToken);
47254725
node.expression = allowInAnd(parseExpression);
47264726
parseExpected(SyntaxKind.CloseParenToken);
4727-
node.statement = parseStatement();
4727+
node.statement = doInsideOfContext(NodeFlags.InWithStatement, parseStatement);
47284728
return finishNode(node);
47294729
}
47304730

src/compiler/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,14 +451,15 @@ namespace ts {
451451
/* @internal */
452452
PossiblyContainsDynamicImport = 1 << 19,
453453
JSDoc = 1 << 20, // If node was parsed inside jsdoc
454+
/* @internal */ InWithStatement = 1 << 21, // If any ancestor of node was the `statement` of a WithStatement (not the `expression`)
454455

455456
BlockScoped = Let | Const,
456457

457458
ReachabilityCheckFlags = HasImplicitReturn | HasExplicitReturn,
458459
ReachabilityAndEmitFlags = ReachabilityCheckFlags | HasAsyncFunctions,
459460

460461
// Parsing context flags
461-
ContextFlags = DisallowInContext | YieldContext | DecoratorContext | AwaitContext | JavaScriptFile,
462+
ContextFlags = DisallowInContext | YieldContext | DecoratorContext | AwaitContext | JavaScriptFile | InWithStatement,
462463

463464
// Exclude these flags when parsing a Type
464465
TypeExcludesFlags = YieldContext | AwaitContext,

src/services/codefixes/fixCannotFindModule.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
namespace ts.codefix {
33
registerCodeFix({
44
errorCodes: [
5-
Diagnostics.Cannot_find_module_0.code,
65
Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code,
76
],
87
getCodeActions: context => {

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ declare namespace ts {
408408
BlockScoped = 3,
409409
ReachabilityCheckFlags = 384,
410410
ReachabilityAndEmitFlags = 1408,
411-
ContextFlags = 96256,
411+
ContextFlags = 2193408,
412412
TypeExcludesFlags = 20480,
413413
}
414414
enum ModifierFlags {

tests/baselines/reference/api/typescript.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ declare namespace ts {
408408
BlockScoped = 3,
409409
ReachabilityCheckFlags = 384,
410410
ReachabilityAndEmitFlags = 1408,
411-
ContextFlags = 96256,
411+
ContextFlags = 2193408,
412412
TypeExcludesFlags = 20480,
413413
}
414414
enum ModifierFlags {

tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts(11,14): error TS2345: Argument of type '{ cb: new <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: any) => string; }'.
1+
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts(11,14): error TS2345: Argument of type '{ cb: new <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: {}) => string; }'.
22
Types of property 'cb' are incompatible.
3-
Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (t: any) => string'.
3+
Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (t: {}) => string'.
44
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts(13,14): error TS2345: Argument of type '{ cb: new (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: new (t: string) => string; }'.
55
Types of property 'cb' are incompatible.
66
Type 'new (x: string, y: number) => string' is not assignable to type 'new (t: string) => string'.
@@ -19,9 +19,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithCon
1919
var arg2: { cb: new <T>(x: T, y: T) => string };
2020
var r2 = foo(arg2); // error
2121
~~~~
22-
!!! error TS2345: Argument of type '{ cb: new <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: any) => string; }'.
22+
!!! error TS2345: Argument of type '{ cb: new <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: {}) => string; }'.
2323
!!! error TS2345: Types of property 'cb' are incompatible.
24-
!!! error TS2345: Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (t: any) => string'.
24+
!!! error TS2345: Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (t: {}) => string'.
2525
var arg3: { cb: new (x: string, y: number) => string };
2626
var r3 = foo(arg3); // error
2727
~~~~

tests/baselines/reference/genericCallWithFunctionTypedArguments2.types

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ var a: {
5353
}
5454

5555
var r = foo(i); // any
56-
>r : any
57-
>foo(i) : any
56+
>r : {}
57+
>foo(i) : {}
5858
>foo : <T>(x: new (a: T) => T) => T
5959
>i : I
6060

@@ -71,8 +71,8 @@ var r3 = foo(i2); // string
7171
>i2 : I2<string>
7272

7373
var r3b = foo(a); // any
74-
>r3b : any
75-
>foo(a) : any
74+
>r3b : {}
75+
>foo(a) : {}
7676
>foo : <T>(x: new (a: T) => T) => T
7777
>a : new <T>(x: T) => T
7878

@@ -101,15 +101,15 @@ var r4 = foo2(1, i2); // error
101101
>i2 : I2<string>
102102

103103
var r4b = foo2(1, a); // any
104-
>r4b : any
105-
>foo2(1, a) : any
104+
>r4b : {}
105+
>foo2(1, a) : {}
106106
>foo2 : <T, U>(x: T, cb: new (a: T) => U) => U
107107
>1 : 1
108108
>a : new <T>(x: T) => T
109109

110110
var r5 = foo2(1, i); // any
111-
>r5 : any
112-
>foo2(1, i) : any
111+
>r5 : {}
112+
>foo2(1, i) : {}
113113
>foo2 : <T, U>(x: T, cb: new (a: T) => U) => U
114114
>1 : 1
115115
>i : I
@@ -141,16 +141,16 @@ function foo3<T, U>(x: T, cb: new(a: T) => U, y: U) {
141141
}
142142

143143
var r7 = foo3(null, i, ''); // any
144-
>r7 : any
145-
>foo3(null, i, '') : any
144+
>r7 : {}
145+
>foo3(null, i, '') : {}
146146
>foo3 : <T, U>(x: T, cb: new (a: T) => U, y: U) => U
147147
>null : null
148148
>i : I
149149
>'' : ""
150150

151151
var r7b = foo3(null, a, ''); // any
152-
>r7b : any
153-
>foo3(null, a, '') : any
152+
>r7b : {}
153+
>foo3(null, a, '') : {}
154154
>foo3 : <T, U>(x: T, cb: new (a: T) => U, y: U) => U
155155
>null : null
156156
>a : new <T>(x: T) => T

tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ module GenericParameter {
8787
>T : T
8888

8989
var r7 = foo5(b); // new any => string; new(x:number) => any
90-
>r7 : { new (x: any): string; new (x: number): any; }
91-
>foo5(b) : { new (x: any): string; new (x: number): any; }
90+
>r7 : { new (x: {}): string; new (x: number): {}; }
91+
>foo5(b) : { new (x: {}): string; new (x: number): {}; }
9292
>foo5 : <T>(cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; }
9393
>b : { new <T>(x: T): string; new <T>(x: number): T; }
9494

@@ -114,8 +114,8 @@ module GenericParameter {
114114
>a : { new (x: boolean): string; new (x: number): boolean; }
115115

116116
var r9 = foo6(b); // new any => string; new(x:any, y?:any) => string
117-
>r9 : { new (x: any): string; new (x: any, y?: any): string; }
118-
>foo6(b) : { new (x: any): string; new (x: any, y?: any): string; }
117+
>r9 : { new (x: {}): string; new (x: {}, y?: {}): string; }
118+
>foo6(b) : { new (x: {}): string; new (x: {}, y?: {}): string; }
119119
>foo6 : <T>(cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
120120
>b : { new <T>(x: T): string; new <T>(x: number): T; }
121121

@@ -137,8 +137,8 @@ module GenericParameter {
137137
}
138138

139139
var r13 = foo7(1, b); // new any => string; new(x:any, y?:any) => string
140-
>r13 : { new (x: any): string; new (x: any, y?: any): string; }
141-
>foo7(1, b) : { new (x: any): string; new (x: any, y?: any): string; }
140+
>r13 : { new (x: {}): string; new (x: {}, y?: {}): string; }
141+
>foo7(1, b) : { new (x: {}): string; new (x: {}, y?: {}): string; }
142142
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
143143
>1 : 1
144144
>b : { new <T>(x: T): string; new <T>(x: number): T; }
@@ -162,15 +162,15 @@ module GenericParameter {
162162
>T : T
163163

164164
var r14 = foo7(1, c); // new any => string; new(x:any, y?:any) => string
165-
>r14 : { new (x: any): string; new (x: any, y?: any): string; }
166-
>foo7(1, c) : { new (x: any): string; new (x: any, y?: any): string; }
165+
>r14 : { new (x: {}): string; new (x: {}, y?: {}): string; }
166+
>foo7(1, c) : { new (x: {}): string; new (x: {}, y?: {}): string; }
167167
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
168168
>1 : 1
169169
>c : { <T>(x: number): T; new <T>(x: T): string; }
170170

171171
var r15 = foo7(1, c2); // new any => string; new(x:any, y?:any) => string
172-
>r15 : { new (x: any): string; new (x: any, y?: any): string; }
173-
>foo7(1, c2) : { new (x: any): string; new (x: any, y?: any): string; }
172+
>r15 : { new (x: {}): string; new (x: {}, y?: {}): string; }
173+
>foo7(1, c2) : { new (x: {}): string; new (x: {}, y?: {}): string; }
174174
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
175175
>1 : 1
176176
>c2 : { new <T>(x: T): string; new <T>(x: number): T; }

tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts(31,20): error TS2345: Argument of type 'new <T>(x: T, y: T) => string' is not assignable to parameter of type '{ new (x: any): string; new (x: any, y?: any): string; }'.
1+
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts(31,20): error TS2345: Argument of type 'new <T>(x: T, y: T) => string' is not assignable to parameter of type '{ new (x: {}): string; new (x: {}, y?: {}): string; }'.
22

33

44
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts (1 errors) ====
@@ -34,7 +34,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOve
3434
var b: { new <T>(x: T, y: T): string };
3535
var r10 = foo6(b); // error
3636
~
37-
!!! error TS2345: Argument of type 'new <T>(x: T, y: T) => string' is not assignable to parameter of type '{ new (x: any): string; new (x: any, y?: any): string; }'.
37+
!!! error TS2345: Argument of type 'new <T>(x: T, y: T) => string' is not assignable to parameter of type '{ new (x: {}): string; new (x: {}, y?: {}): string; }'.
3838

3939
function foo7<T>(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) {
4040
return cb;

tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ module GenericParameter {
6363
>T : T
6464

6565
var r6 = foo5(a); // ok
66-
>r6 : { new (x: any): string; new (x: number): any; }
67-
>foo5(a) : { new (x: any): string; new (x: number): any; }
66+
>r6 : { new (x: {}): string; new (x: number): {}; }
67+
>foo5(a) : { new (x: {}): string; new (x: number): {}; }
6868
>foo5 : <T>(cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; }
6969
>a : new <T>(x: T) => T
7070

@@ -115,8 +115,8 @@ module GenericParameter {
115115
}
116116

117117
var r13 = foo7(1, a); // ok
118-
>r13 : { new (x: any): string; new (x: any, y?: any): string; }
119-
>foo7(1, a) : { new (x: any): string; new (x: any, y?: any): string; }
118+
>r13 : { new (x: {}): string; new (x: {}, y?: {}): string; }
119+
>foo7(1, a) : { new (x: {}): string; new (x: {}, y?: {}): string; }
120120
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
121121
>1 : 1
122122
>a : new <T>(x: T) => T
@@ -131,8 +131,8 @@ module GenericParameter {
131131
>T : T
132132

133133
var r14 = foo7(1, c); // ok
134-
>r14 : { new (x: any): string; new (x: any, y?: any): string; }
135-
>foo7(1, c) : { new (x: any): string; new (x: any, y?: any): string; }
134+
>r14 : { new (x: {}): string; new (x: {}, y?: {}): string; }
135+
>foo7(1, c) : { new (x: {}): string; new (x: {}, y?: {}): string; }
136136
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
137137
>1 : 1
138138
>c : { new <T>(x: T): number; new <T>(x: number): T; }

tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.types

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ module GenericParameter {
8383
>T : T
8484

8585
var r7 = foo5(a); // any => string (+1 overload)
86-
>r7 : { (x: any): string; (x: number): any; }
87-
>foo5(a) : { (x: any): string; (x: number): any; }
86+
>r7 : { (x: {}): string; (x: number): {}; }
87+
>foo5(a) : { (x: {}): string; (x: number): {}; }
8888
>foo5 : <T>(cb: { (x: T): string; (x: number): T; }) => { (x: T): string; (x: number): T; }
8989
>a : { <T>(x: T): string; <T>(x: number): T; }
9090

@@ -112,8 +112,8 @@ module GenericParameter {
112112
>x : any
113113

114114
var r9 = foo6(<T>(x: T) => ''); // any => string (+1 overload)
115-
>r9 : { (x: any): string; (x: any, y?: any): string; }
116-
>foo6(<T>(x: T) => '') : { (x: any): string; (x: any, y?: any): string; }
115+
>r9 : { (x: {}): string; (x: {}, y?: {}): string; }
116+
>foo6(<T>(x: T) => '') : { (x: {}): string; (x: {}, y?: {}): string; }
117117
>foo6 : <T>(cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
118118
><T>(x: T) => '' : <T>(x: T) => string
119119
>T : T
@@ -122,8 +122,8 @@ module GenericParameter {
122122
>'' : ""
123123

124124
var r11 = foo6(<T>(x: T, y?: T) => ''); // any => string (+1 overload)
125-
>r11 : { (x: any): string; (x: any, y?: any): string; }
126-
>foo6(<T>(x: T, y?: T) => '') : { (x: any): string; (x: any, y?: any): string; }
125+
>r11 : { (x: {}): string; (x: {}, y?: {}): string; }
126+
>foo6(<T>(x: T, y?: T) => '') : { (x: {}): string; (x: {}, y?: {}): string; }
127127
>foo6 : <T>(cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
128128
><T>(x: T, y?: T) => '' : <T>(x: T, y?: T) => string
129129
>T : T
@@ -160,8 +160,8 @@ module GenericParameter {
160160
>x : any
161161

162162
var r13 = foo7(1, <T>(x: T) => ''); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]
163-
>r13 : { (x: any): string; (x: any, y?: any): string; }
164-
>foo7(1, <T>(x: T) => '') : { (x: any): string; (x: any, y?: any): string; }
163+
>r13 : { (x: {}): string; (x: {}, y?: {}): string; }
164+
>foo7(1, <T>(x: T) => '') : { (x: {}): string; (x: {}, y?: {}): string; }
165165
>foo7 : <T>(x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
166166
>1 : 1
167167
><T>(x: T) => '' : <T>(x: T) => string
@@ -180,8 +180,8 @@ module GenericParameter {
180180
>T : T
181181

182182
var r14 = foo7(1, a); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]
183-
>r14 : { (x: any): string; (x: any, y?: any): string; }
184-
>foo7(1, a) : { (x: any): string; (x: any, y?: any): string; }
183+
>r14 : { (x: {}): string; (x: {}, y?: {}): string; }
184+
>foo7(1, a) : { (x: {}): string; (x: {}, y?: {}): string; }
185185
>foo7 : <T>(x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
186186
>1 : 1
187187
>a : { <T>(x: T): string; <T>(x: number): T; }

0 commit comments

Comments
 (0)