Vithrax
Explore posts from serversDTDrizzle Team
•Created by Vithrax on 2/11/2024 in #help
createInsertSchema
Hi,
I have small issue with createInsertSchema function. Optional columns can have value or be undefined or null - and null type conflicts with HTMLInputElement attributes. I can't find a way to override the type to be value | undefined.
Do you have any suggestions on how to tackle this? Code below
NewRecipe type is
Just for clarity, i want to change, for example, description to be string | undefined.
3 replies
TTCTheo's Typesafe Cult
•Created by Vithrax on 9/5/2023 in #questions
tailwind error?
Hey
I have a weird... Bug? i think. It looks like hidden class has presedence over the md:flex?
https://gyazo.com/715ab2f6df0172b4c3bbf730e83e8aa6
When i manually turn off hidden then it looks ok
Any suggestion guys?
3 replies
TTCTheo's Typesafe Cult
•Created by Vithrax on 8/25/2023 in #questions
Zod object validator using Prisma (MySQL) enum
Hey, could anyone hint how to create a zod validator object, which one of the keys should be an enum from prisma (mysql)
zod validator (here is the issue, please help)
when parsing body on backend using this validator, category is just a string, which causes another type error on the backend when creating a new record
pls help!
2 replies