Skip to content

Commit 9e2761f

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

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
@@ -23995,7 +23995,7 @@ namespace ts {
2399523995
const thisType = getThisTypeOfSignature(signature);
2399623996
if (thisType) {
2399723997
const thisArgumentNode = getThisArgumentOfCall(node);
23998-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
23998+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2399923999
inferTypes(context.inferences, thisArgumentType, thisType);
2400024000
}
2400124001

0 commit comments

Comments
 (0)