mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 12:03:44 -05:00
Merge pull request #19697 from Microsoft/fixFreshLiteralsInIntersections
Fix fresh literals in intersections
This commit is contained in:
@@ -7592,11 +7592,11 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
// Add the given types to the given type set. Order is preserved, duplicates are removed,
|
||||
// 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.
|
||||
function addTypesToIntersection(typeSet: TypeSet, types: Type[]) {
|
||||
for (const type of types) {
|
||||
addTypeToIntersection(typeSet, type);
|
||||
addTypeToIntersection(typeSet, getRegularTypeOfLiteralType(type));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user