Types in Next.js Client components

I've got a schema (schema.ts) which defines my tables, a file for type declarations (types.ts) with things like export type Product = typeof products.$inferSelect;

How am I supposed to use these types in client components? Since the types.ts imports from schema.ts we're no longer in client-only land and I get errors like Cannot resolve module 'fs' and similar.
Was this page helpful?