diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index bd782c57d20..f12d2a2ccb7 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -13460,7 +13460,7 @@ namespace ts { if (t.flags & TypeFlags.Union) { const origin = (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, (origin).types);