Runtime types generation
Hi there, I set up a small database and I was able to generate types following the instructions here.
https://supabase.com/docs/reference/javascript/typescript-support
I'm wondering if there's a way to generate those same types programmatically? If I could call something special from within Typescript, then even though the type information would not be available at compile time, I would have a more dynamic system that doesn't require the custom steps of calling the CLI and explicitly importing the generated types from a file.
JavaScript: TypeScript support | Supabase Docs
Supabase API reference for JavaScript: TypeScript support
2 Replies
No this is the way of generating types, there is not another way that Supabase provides. You can probably find third party library that will be able to help with what you are after, remember the database is just Postgres, so any tools that can generate types from a database table will work.
Ok, thank you!