Skip to content

Commit e905ffa

Browse files
committed
Higher order this parameter inference, like microsoft#31116
1 parent ea4e6b3 commit e905ffa

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
@@ -23725,7 +23725,7 @@ namespace ts {
2372523725
const thisType = getThisTypeOfSignature(signature);
2372623726
if (thisType) {
2372723727
const thisArgumentNode = getThisArgumentOfCall(node);
23728-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
23728+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2372923729
inferTypes(context.inferences, thisArgumentType, thisType);
2373023730
}
2373123731

0 commit comments

Comments
 (0)