Skip to content

Commit 151ac8c

Browse files
committed
Higher order this parameter inference, like microsoft#31116
1 parent aa39080 commit 151ac8c

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
@@ -23663,7 +23663,7 @@ namespace ts {
2366323663
const thisType = getThisTypeOfSignature(signature);
2366423664
if (thisType) {
2366523665
const thisArgumentNode = getThisArgumentOfCall(node);
23666-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
23666+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2366723667
inferTypes(context.inferences, thisArgumentType, thisType);
2366823668
}
2366923669

0 commit comments

Comments
 (0)