Skip to content

Commit d753470

Browse files
committed
Higher order this parameter inference, like microsoft#31116
1 parent 9a357c1 commit d753470

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24150,7 +24150,7 @@ namespace ts {
2415024150
const thisType = getThisTypeOfSignature(signature);
2415124151
if (thisType) {
2415224152
const thisArgumentNode = getThisArgumentOfCall(node);
24153-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
24153+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2415424154
inferTypes(context.inferences, thisArgumentType, thisType);
2415524155
}
2415624156

0 commit comments

Comments
 (0)