Skip to content

Commit 596856b

Browse files
committed
Higher order this parameter inference, like microsoft#31116
1 parent 77f4d9f commit 596856b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23500,7 +23500,7 @@ namespace ts {
2350023500
const thisType = getThisTypeOfSignature(signature);
2350123501
if (thisType) {
2350223502
const thisArgumentNode = getThisArgumentOfCall(node);
23503-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
23503+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2350423504
inferTypes(context.inferences, thisArgumentType, thisType);
2350523505
}
2350623506

0 commit comments

Comments
 (0)