cusx
cusx
Aarktype
Created by Stuart B on 8/23/2024 in #questions
Automatically applying parse.integer
Thank you @ssalbdivad
163 replies
Aarktype
Created by Stuart B on 8/23/2024 in #questions
Automatically applying parse.integer
So what's the recommended way to coerce a string into an integer?
const verifyOtpSchema = type({
otp: '99999 <= number.integer < 1000000',
})
const verifyOtpSchema = type({
otp: '99999 <= number.integer < 1000000',
})
How can I make this schema accept a string numeric input? i.e. '123456'
163 replies
DTDrizzle Team
Created by cusx on 7/12/2024 in #help
How can I get the Typescript return type of a drizzle statement?
@Raphaël M (@rphlmr) ⚡ thannks for the response. unfortunately I can't use await because I'm writing statements that I can later use in various db.batch calls. So for now, I'll have to rely on Typescript inference, and turn off the eslint explicit return type rule. 😅
7 replies