Skip to content

Commit 3a342e6

Browse files
committed
Higher order this parameter inference, like microsoft#31116
1 parent b845800 commit 3a342e6

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
@@ -23506,7 +23506,7 @@ namespace ts {
2350623506
const thisType = getThisTypeOfSignature(signature);
2350723507
if (thisType) {
2350823508
const thisArgumentNode = getThisArgumentOfCall(node);
23509-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
23509+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2351023510
inferTypes(context.inferences, thisArgumentType, thisType);
2351123511
}
2351223512

0 commit comments

Comments
 (0)