NuxtN
Nuxt9mo ago
8 replies
Redeemr

Sharing types from Server to Client

In my nuxt project, I want to use drizzle-zod to generate types based on my database schema. Currently the schema file is in the server folder but the place I want to use the type is on the client ( in the app folder ). In order to properly do this would I need to move the drizzle schema to the shared folder or would I import the schema into a file in the shared folder, generate the type there and then export it?
Was this page helpful?