Is your feature request related to a problem? Please describe.
The barrel file that exports input type schemas does not also export types. For example:
// ...
export { PlanSchema } from './PlanSchema';
export { GradeLevelSchema } from './GradeLevelSchema';
export { InputTypeSchema } from './InputTypeSchema';
export { InputRoleSchema } from './InputRoleSchema';
// ...
Describe the solution you'd like
Currently, each inputTypeSchema file also exports its type, e.g.
import { z } from 'zod';
export const PlanSchema = z.enum(['FREE','PRO']);
export type PlanType = `${z.infer<typeof PlanSchema>}`
export default PlanSchema;
I'd like the barrel file to additionally export the type that corresponds with the schema, e.g.
// ...
export { PlanSchema, type PlanType } from './PlanSchema';
export { GradeLevelSchema, type GradeLevelType } from './GradeLevelSchema';
export { InputTypeSchema, type InputTypeType } from './InputTypeSchema';
export { InputRoleSchema, type InputRoleType } from './InputRoleSchema';
// ...
Describe alternatives you've considered
I could also mention each generated file in the package.json file that exports these schemas, but then I would need to autogenerate the package.json file as well.
Additional context
Our polyrepo contains many packages, one of which is the "database" package that exports the prisma client and these additional zod-prisma-types generated schemas and types.
Is your feature request related to a problem? Please describe.
The barrel file that exports input type schemas does not also export types. For example:
Describe the solution you'd like Currently, each inputTypeSchema file also exports its type, e.g.
I'd like the barrel file to additionally export the type that corresponds with the schema, e.g.
Describe alternatives you've considered
I could also mention each generated file in the package.json file that exports these schemas, but then I would need to autogenerate the package.json file as well.
Additional context Our polyrepo contains many packages, one of which is the "database" package that exports the prisma client and these additional zod-prisma-types generated schemas and types.