Skip to content

Commit 54a2399

Browse files
committed
Higher order this parameter inference, like microsoft#31116
1 parent db75d3c commit 54a2399

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23674,7 +23674,7 @@ namespace ts {
2367423674
const thisType = getThisTypeOfSignature(signature);
2367523675
if (thisType) {
2367623676
const thisArgumentNode = getThisArgumentOfCall(node);
23677-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
23677+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2367823678
inferTypes(context.inferences, thisArgumentType, thisType);
2367923679
}
2368023680

0 commit comments

Comments
 (0)