Skip to content

Commit edf3ce2

Browse files
committed
Higher order this parameter inference, like microsoft#31116
1 parent 98492d8 commit edf3ce2

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
@@ -24257,7 +24257,7 @@ namespace ts {
2425724257
const thisType = getThisTypeOfSignature(signature);
2425824258
if (thisType) {
2425924259
const thisArgumentNode = getThisArgumentOfCall(node);
24260-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
24260+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2426124261
inferTypes(context.inferences, thisArgumentType, thisType);
2426224262
}
2426324263

0 commit comments

Comments
 (0)