We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a7a587 commit 6911acfCopy full SHA for 6911acf
1 file changed
src/compiler/checker.ts
@@ -7589,11 +7589,11 @@ namespace ts {
7589
}
7590
7591
7592
- // Add the given types to the given type set. Order is preserved, duplicates are removed,
7593
- // and nested types of the given kind are flattened into the set.
+ // Add the given types to the given type set. Order is preserved, freshness is removed from literal
+ // types, duplicates are removed, and nested types of the given kind are flattened into the set.
7594
function addTypesToIntersection(typeSet: TypeSet, types: Type[]) {
7595
for (const type of types) {
7596
- addTypeToIntersection(typeSet, type);
+ addTypeToIntersection(typeSet, getRegularTypeOfLiteralType(type));
7597
7598
7599
0 commit comments