Skip to content

Commit 2885e84

Browse files
committed
Higher order this parameter inference, like microsoft#31116
1 parent 196c0aa commit 2885e84

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
@@ -23658,7 +23658,7 @@ namespace ts {
2365823658
const thisType = getThisTypeOfSignature(signature);
2365923659
if (thisType) {
2366023660
const thisArgumentNode = getThisArgumentOfCall(node);
23661-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
23661+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2366223662
inferTypes(context.inferences, thisArgumentType, thisType);
2366323663
}
2366423664

0 commit comments

Comments
 (0)