Closed tom-at-pixel closed 9 months ago
Thanks for reporting this @tom-at-pixel. I'm going to transfer this to the postgres-meta repo and someone there can give you a hand.
@tom-at-pixel @gregnr is this issue fixed already? i dont seem to be able to reproduce.
@mahendraHegde Sorry for the delay in response. This is still an issue.
To repro, open a query editor in Supabase Studio and run this code:
CREATE TYPE test_array_type AS (
my_text_array text[]
);
Then generate the types on the client-side:
npx supabase gen types typescript --schema public
The generated types include:
export interface Database {
public: {
...
CompositeTypes: {
...
test_array_type: {
my_text_array: unknown
}
}
}
}
I would expect my_text_array
to be of type string[]
, but maybe I am misunderstanding something and this is the expected behavior.
I got the same problem, any updates?
Bug report
Describe the bug
Generating TypeScript types for a Supabase project is resulting in unexpected
unknown
properties. Specifically, any array type (e.g.text[]
) generatesunknown
(instead of e.g.string[]
).To Reproduce
text[]
in Supabase:Observe the
unknown
property in the generated TypeScript types:Expected behavior
I would expect a
string[]
property in the generated types:System information