A
arktype•6d ago
kyoumei

Optional union value?

Hey guys, if I have an object with a key that can either be a number or a string or can be missing. How can I validate it? Thank you
3 Replies
ssalbdivad
ssalbdivad•6d ago
ArkType
ArkType Docs
TypeScript's 1:1 validator, optimized from editor to runtime
kyoumei
kyoumeiOP•6d ago
I am not sure how I didn't see that. Thank you - that's what I needed
ssalbdivad
ssalbdivad•6d ago
Glad that was helpful! Good luck 😊

Did you find this page helpful?