Marius
PPrisma
•Created by Marius on 3/10/2025 in #help-and-questions
Cannot import type in svelte component
Hi, I'm trying to use prisma-generated types in a Svelte (client side) component.
Is this possible in principle? I want to set the color depending on the value the prop
type
has. My browser console tells me TagType
is undefined, but I don't get why. Vite doesn't report any errors.
My IDE tells me that type === TagType.FIRE
always returns null because there is no overlap.
Can I solve this somehow?
Thanks in advance!5 replies