Father Christmas
Father Christmas
Explore posts from servers
DTDrizzle Team
Created by Father Christmas on 2/28/2025 in #help
Use DB functions to format data on update e.g. DATE()
A somewhat hacky solution that somewhat works is branded types of string of the validated date
2 replies
Aarktype
Created by Father Christmas on 2/9/2025 in #questions
What is the ArkType equivalent of Zod's safeParse?
Fair enough
18 replies
Aarktype
Created by Father Christmas on 2/9/2025 in #questions
What is the ArkType equivalent of Zod's safeParse?
Oh I missed that part. In that case nothing much is a problem aside from the somewhat awkward ergonomics of x instanceof y instead of having a nice result value { success: true; data: T; } | { success: false; error: ZodError; }. This also helps in for example directly returning that whole result since it already looks like something you'd return with the "success" thing. I don't know how good returning this directly would be but again this is not a big deal.
18 replies
Aarktype
Created by Father Christmas on 2/9/2025 in #questions
What is the ArkType equivalent of Zod's safeParse?
I did not find this when searching for safeParse - I might have searched in the wrong input on Discord I am not familiar with such nuances. Also It did not provide the answer. I am mainly interested in the "non throwing" aspect of the safeParse method. I'd love to see the library have an equivalent instead of me having to either try catch or manually writing a function for that.
18 replies
Aarktype
Created by Father Christmas on 2/9/2025 in #questions
What is the ArkType equivalent of Zod's safeParse?
No, I mean zod literally has a schema.safeParse function that does not throw but instead returns something like an option - { success: true; data: T; } | { success: false; error: ZodError; }.
18 replies
TtRPC
Created by reepicheep on 10/23/2023 in #❓-help
What is the pattern for unsubscribing from a subscription?
I'd like to know too.
5 replies