Skip to content

Commit 3e0fdad

Browse files
committed
fix(typegen): enum arrays
Context: supabase/cli#413
1 parent 8bce945 commit 3e0fdad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/templates/typescript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const pgTypeToTsType = (pgType: string, types: PostgresType[]): string => {
152152
} else if (pgType === 'record') {
153153
return 'Record<string, unknown>[]'
154154
} else if (pgType.startsWith('_')) {
155-
return pgTypeToTsType(pgType.substring(1), types) + '[]'
155+
return `(${pgTypeToTsType(pgType.substring(1), types)})[]`
156156
} else {
157157
const type = types.find((type) => type.name === pgType && type.enums.length > 0)
158158
if (type) {

0 commit comments

Comments
 (0)