mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
No union subtype reduction during type inference (#37327)
* No union type subtype reduction in getImplicitIndexTypeOfType * Add regression test
This commit is contained in:
@@ -10465,7 +10465,7 @@ namespace ts {
|
||||
append(propTypes, getIndexTypeOfType(type, IndexKind.Number));
|
||||
}
|
||||
if (propTypes.length) {
|
||||
return getUnionType(propTypes, UnionReduction.Subtype);
|
||||
return getUnionType(propTypes);
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user