[Updated] How to get correct types for nested fields without losing types for main object
Maybe this is of help, I don't use typescript though...
https://supabase.com/docs/reference/javascript/next/typescript-support#nested-tables
https://supabase.com/docs/reference/javascript/next/typescript-support#nested-tables
supabase-js supports Typescript.