Skip to content

Commit cec8d52

Browse files
committed
Slight adjustment to check in isConstraintPosition
1 parent 3519af0 commit cec8d52

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
@@ -24755,7 +24755,7 @@ namespace ts {
2475524755
return parent.kind === SyntaxKind.PropertyAccessExpression ||
2475624756
parent.kind === SyntaxKind.CallExpression && (parent as CallExpression).expression === node ||
2475724757
parent.kind === SyntaxKind.ElementAccessExpression && (parent as ElementAccessExpression).expression === node &&
24758-
!(isGenericTypeWithoutNullableConstraint(type) && isGenericIndexType(getTypeOfExpression((parent as ElementAccessExpression).argumentExpression)));
24758+
!(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression((parent as ElementAccessExpression).argumentExpression)));
2475924759
}
2476024760

2476124761
function isGenericTypeWithUnionConstraint(type: Type) {

0 commit comments

Comments
 (0)