Skip to content

Commit fbe40ca

Browse files
committed
Higher order this parameter inference, like #31116
1 parent f1c0300 commit fbe40ca

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
@@ -23476,7 +23476,7 @@ namespace ts {
2347623476
const thisType = getThisTypeOfSignature(signature);
2347723477
if (thisType) {
2347823478
const thisArgumentNode = getThisArgumentOfCall(node);
23479-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
23479+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2348023480
inferTypes(context.inferences, thisArgumentType, thisType);
2348123481
}
2348223482

0 commit comments

Comments
 (0)