Mir
Mir
TTCTheo's Typesafe Cult
Created by Mir on 6/5/2023 in #questions
[PRISMA] Adding method with param in result object
That's one solution for sure. But it's a big app, so a method would help maintaining and keep track of it.
11 replies
TTCTheo's Typesafe Cult
Created by Mir on 6/5/2023 in #questions
[PRISMA] Adding method with param in result object
No. It will interact with some of the result value.
11 replies
TTCTheo's Typesafe Cult
Created by Mir on 5/13/2023 in #questions
Zod conditional required/optional validation
This is actually is the best way to handle this problem! tysm!! ❤️
29 replies
TTCTheo's Typesafe Cult
Created by Mir on 5/13/2023 in #questions
Zod conditional required/optional validation
This seems like the best solution overall! 💯 🙏 You guys are awesome!! TYSM!!! ❤️
29 replies
TTCTheo's Typesafe Cult
Created by Mir on 5/13/2023 in #questions
Zod conditional required/optional validation
so, add a separate refine for each fields?
29 replies
TTCTheo's Typesafe Cult
Created by Mir on 5/13/2023 in #questions
Zod conditional required/optional validation
.refine(d => { if(d.someKey !== undefined) return false })
.refine(d => { if(d.someKey !== undefined) return false })
?
29 replies
TTCTheo's Typesafe Cult
Created by Mir on 5/13/2023 in #questions
Zod conditional required/optional validation
Okay one more small addition to it, how will it work if keys does not match the enums? 👀
29 replies
TTCTheo's Typesafe Cult
Created by Mir on 5/13/2023 in #questions
Zod conditional required/optional validation
I want image to be required only when type: image is selected.
29 replies
TTCTheo's Typesafe Cult
Created by Mir on 5/13/2023 in #questions
Zod conditional required/optional validation
I read it already. If you can provide an example that would be appreciated.
29 replies
TTCTheo's Typesafe Cult
Created by mid on 4/11/2023 in #questions
useSession must be wrapped in a <SessionProvider />
bruh
16 replies
TTCTheo's Typesafe Cult
Created by Mir on 11/17/2022 in #questions
How should I organize my app where it has different behavior in responsive layout?
I decided to go with this way. Does this look good?
# Comp:
- MobileComp
- DesktopComp

# SharedComps
# Comp:
- MobileComp
- DesktopComp

# SharedComps
12 replies
TTCTheo's Typesafe Cult
Created by Mir on 11/17/2022 in #questions
How should I organize my app where it has different behavior in responsive layout?
How would you organize this two separate behavior structurally in code?
12 replies
TTCTheo's Typesafe Cult
Created by Mir on 9/30/2022 in #questions
Why typescript type inference is behaving like this?
7 replies
TTCTheo's Typesafe Cult
Created by Mir on 9/30/2022 in #questions
Why typescript type inference is behaving like this?
Yes, it can properly infer when I assign a variable to it.
7 replies