how to generate custom json types with prisma-json-types-generator?
Closed this issue · 3 comments
Hi. I tried using prisma-json-types-generator but it looks the json type generated by prisma-kysely
is still unknown
even after declaring prisma-kysely
right after prisma-json-types-generator
Hey there @waptik. We don't have any inter-compatibility with other generators, and it's not planned as of right now. Sorry. You could possibly use zod to achieve what you're looking for, or just perform a straight cast if you are confident that the type is correct.
@valtyr Would you accept PR's if I checked on how to make it compatible with other generators?
@Pruxis I have a separate feature planned that should make this possible. We already support per-field type overrides using the /// @kyselyType(...)
docstring. Here's the section in the README. What's missing is a way to add a preamble to the prisma-kysely output file with import statements. We'll be tracking the feature in issue #61.