Best TypeScript DX for Supabase Edge Functions

supabase devs, what's the best DX when working with edge functions? i'd love to be able to automatically infer the payload and response types of a supabase functions when using functions.invoke. the current type generator doesn't support this, which is a huge feature request I have. so does anyone have a solid workflow?

right now, if i use zod schemas inside the function file and z.infer to determine the typescript type, if i import this type in my nextjs app, it would be any, because the package manager doesn't recognize the zod import within the edge fn.

would love ur thoughts and suggestions
Was this page helpful?