Skip to content

Commit 9ecbf20

Browse files
committed
Higher order this parameter inference, like #31116
1 parent 3dd7b84 commit 9ecbf20

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
@@ -21888,7 +21888,7 @@ namespace ts {
2188821888
const thisType = getThisTypeOfSignature(signature);
2188921889
if (thisType) {
2189021890
const thisArgumentNode = getThisArgumentOfCall(node);
21891-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
21891+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2189221892
inferTypes(context.inferences, thisArgumentType, thisType);
2189321893
}
2189421894

0 commit comments

Comments
 (0)