psteinroe / supabase-to-zod

Generate Zod schemas (v3) from Typescript types generated by the Supabase CLI.
MIT License
99 stars 4 forks source link

`Record<PropertyKey, never>` is not supported #8

Open bukinoshita opened 1 year ago

bukinoshita commented 1 year ago

I'm getting an error Error: Record<PropertyKey, …> are not supported when running supabase-to-zod

psteinroe commented 1 year ago

Hey! Thanks for reporting. Can you try v1.0.1? I guess this was introduced by the latest patch.

ajhaupt7 commented 1 year ago

I'm getting the same issue on 1.0.4

LordZardeck commented 1 year ago

I am also unable to use this with the latest supabase cli. There are some functions that have this as the args type:

is_admin: {
    Args: Record<PropertyKey, never>
    Returns: boolean
}
psteinroe commented 1 year ago

Thanks for your interest in using this library. Can you try using an older version? I won't invest time into this approach, and instead will try to contribute a zod template to supabase meta. This will enable users to generate the zod schemas the same way they generate the typescript types, and is by far a better way of achieving this.

mikestopcontinues commented 1 year ago

@psteinroe Any news on the template?

psteinroe commented 1 year ago

@psteinroe Any news on the template?

my priorities are currently elsewhere. if you need it soon, consider contributing it yourself, or sponsor me or someone else to build it for you.

kapitanluffy commented 1 year ago

Dropping relevant issues:

ergodic1 commented 7 months ago

All works for me now for above.