No union subtype reduction during type inference (#37327)

* No union type subtype reduction in getImplicitIndexTypeOfType

* Add regression test
This commit is contained in:
Anders Hejlsberg authored and GitHub committed 2020-03-11 10:27:51 -07:00
1 parent 505e7fb5d9
commit b78ef30cb7
5 files changed
+255 -1

No files matched your search

+1 -1
View File
@@ -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;