Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
mullsork
· 3y ago · 0 comments
IIRC that's what oneOf is for. i.e. a discriminated union / sum type. My experience with oneOf is that tooling support for it is terrible.
Comments
[–]
Pxtl
3y ago
Ah, I didn't realize you could use oneOf with refs or objects, I've only ever seen it used with primitives. Thanks!