Skip to content

Commit 9cbdc78

Browse files
UnionType deduplication
1 parent 79c0551 commit 9cbdc78

File tree

1 file changed

+1
-1
lines changed
  • typescript-generator-core/src/main/java/cz/habarta/typescript/generator

1 file changed

+1
-1
lines changed

typescript-generator-core/src/main/java/cz/habarta/typescript/generator/TsType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public static class UnionType extends TsType {
168168
public final List<TsType> types;
169169

170170
public UnionType(List<? extends TsType> types) {
171-
this.types = new ArrayList<TsType>(types);
171+
this.types = new ArrayList<TsType>(new LinkedHashSet<TsType>(types));
172172
}
173173

174174
@Override

0 commit comments

Comments
 (0)