Skip to content

Commit 4fcf8c7

Browse files
committed
Higher order this parameter inference, like microsoft#31116
1 parent d0c961e commit 4fcf8c7

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

0 commit comments

Comments
 (0)