Skip to content

Commit ca633ab

Browse files
committed
Fix invalid TypeScript syntax for array of union
1 parent 1ac54d6 commit ca633ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/generate/src/edgeql-js/generateInterfaces.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ export const generateInterfaces = (params: GenerateInterfacesParams) => {
121121
Boolean(targetType.union_of?.length);
122122

123123
if (isUnion) {
124-
return targetType.union_of
124+
return `(${targetType.union_of
125125
.map(({ id }) => types.get(id))
126126
.map((member) => getTypeName(member.name))
127-
.join(" | ");
127+
.join(" | ")})`;
128128
} else if (isLink) {
129129
return getTypeName(targetType.name);
130130
} else {

0 commit comments

Comments
 (0)