File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10394,11 +10394,11 @@ namespace ts {
1039410394 }
1039510395
1039610396 // Check for compatible indexer types.
10397- const allowedOptionalFlags = strictNullChecks ? 0 : TypeFlags.Null | TypeFlags.Undefined ;
10398- if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, TypeFlags.StringLike | TypeFlags.NumberLike | TypeFlags.ESSymbol | allowedOptionalFlags )) {
10397+ const allowedNullableFlags = strictNullChecks ? 0 : TypeFlags.Nullable ;
10398+ if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, TypeFlags.StringLike | TypeFlags.NumberLike | TypeFlags.ESSymbol | allowedNullableFlags )) {
1039910399
1040010400 // Try to use a number indexer.
10401- if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, TypeFlags.NumberLike | allowedOptionalFlags ) || isForInVariableForNumericPropertyNames(node.argumentExpression)) {
10401+ if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, TypeFlags.NumberLike | allowedNullableFlags ) || isForInVariableForNumericPropertyNames(node.argumentExpression)) {
1040210402 const numberIndexInfo = getIndexInfoOfType(objectType, IndexKind.Number);
1040310403 if (numberIndexInfo) {
1040410404 getNodeLinks(node).resolvedIndexInfo = numberIndexInfo;
You can’t perform that action at this time.
0 commit comments