Skip to content

Commit 62a7dde

Browse files
committed
Higher order this parameter inference, like microsoft#31116
1 parent eb0208c commit 62a7dde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23538,7 +23538,7 @@ namespace ts {
2353823538
const thisType = getThisTypeOfSignature(signature);
2353923539
if (thisType) {
2354023540
const thisArgumentNode = getThisArgumentOfCall(node);
23541-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
23541+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2354223542
inferTypes(context.inferences, thisArgumentType, thisType);
2354323543
}
2354423544

0 commit comments

Comments
 (0)