mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-10-29 17:06:12 +08:00
Ensure no duplicates in named union list
This commit is contained in:
1 parent
26bbdf1173
commit
361e19bbe8
1 file changed
+1
-1
@@ -13460,7 +13460,7 @@ namespace ts {
|
||||
if (t.flags & TypeFlags.Union) {
|
||||
const origin = (<UnionType>t).origin;
|
||||
if (t.aliasSymbol || origin && !(origin.flags & TypeFlags.Union)) {
|
||||
namedUnions.push(t);
|
||||
pushIfUnique(namedUnions, t);
|
||||
}
|
||||
else if (origin && origin.flags & TypeFlags.Union) {
|
||||
addNamedUnions(namedUnions, (<UnionType>origin).types);
|
||||
|
||||
Reference in new issue
Block a user