Closed juh9870 closed 1 year ago
@juh9870 I don't know what you mean by "they use import { type Prisma } from '@prisma/client';
"?
The generator should generate import type { Prisma } from '@prisma/client';
. Is this not the case on your end?
Yes, it generates import { type...
Have just updated to 2.3.5, and problem still remains.
My prisma config:
generator zod {
provider = "zod-prisma-types"
createRelationValuesTypes = true
}
Full project: https://github.com/juh9870/library-backend
@juh9870 sorry my bad. had some code fragments where the described import was used. should be fixed in the latest version.
Issue still remains, I use single file generation, so this line is problematic: https://github.com/chrishoermann/zod-prisma-types/blob/0a6162121ed679038bff0c587a8111a8887d8a59/packages/generator/src/functions/writeSingleFileImportStatements.ts#L21
when
"importsNotUsedAsValues": "error"
, generated sources throw an error, because they useimport { type Prisma } from '@prisma/client';
instead ofimport type { Prisma } from '@prisma/client';