Y
Hacker News
new
|
ask
|
show
|
jobs
by
mullsork
1180 days ago
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.
1 comments
Pxtl
1180 days ago
Ah, I didn't realize you could use oneOf with refs or objects, I've only ever seen it used with primitives. Thanks!
link