<@U01SX9PGJ6N> you can always export the enum crea...
# prisma-client
p
@Torrino you can always export the enum created by Prisma from the generate type files
t
Won't that cause me to lose my export when the type file gets regenerated every time I update the original schema?
a
is the type file a declaration file (.d.ts) or a ts file
t
There's the declaration file (.d.ts) that prisma auto generates for all models if you're refering to that.
r
You can import those from
@prisma/client
directly. It will not be lost when you update the original schema as
prisma generate
will make sure the types are generated again.
a
could also generate them in node_modules then use a triple slash directive in a root .d.ts file with its path defined. Then they're available for global consumption with no imports required alternatively you could use module augmentation by extending a desired interface or something with your generated values if you want them integrated in a specific way for whatever reason using the @prisma/client namespace
Copy code
/// <reference path="./node_modules/**/*" />

declare module "./node_modules/**/*"