Zod with types from Supabase type gen

Trying to use types from supabase typegen with Zod, but I can't figure out how. They supabase docs use this weird syntax for getting the data. My current attempt
type TaaS = Database['public']['Tables']['taas']['Row']

const Props = z.object({
user: User,
profile: Profile,
audits: Audit,
taas: z.array(TaaS), <- This fails
});
type TaaS = Database['public']['Tables']['taas']['Row']

const Props = z.object({
user: User,
profile: Profile,
audits: Audit,
taas: z.array(TaaS), <- This fails
});
Any ideas on how I can fix this 🤔
2 Replies
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Vimes
VimesOP•2y ago
hmmm too bad, I'll just type it out by hand 🙂
Want results from more Discord servers?
Add your server