How can i use my prisma Enum definitions in typesc...
# orm-help
h
How can i use my prisma Enum definitions in typescript?
l
Good question! I gave up the last time I tried ... although with Prisma 1
r
@Halvor 👋 You can directly import the enum and use the type:
Copy code
import { EnumName } from '@prisma/client'
h
Thx
With this definition:
Copy code
enum Gamemode {
  DEATHMATCH
  TEAM_DEATHMATCH
  CAPTURE_THE_DIAMOND
  UPRISING
}
I get that the type is not exported, i've rerun "npx prisma generate"
r
Cannot reproduce unfortunately. Getting the correct values on running
prisma generate
. Are you on the latest version of
prisma
and
@prisma/client
?