idonttrustlikethat
idonttrustlikethat copied to clipboard
discriminatedObjectUnion
It would be great if we had a version of discriminatedUnion
that would return an ObjectValidator
(or a subtype) so the result can be used in another discriminatedUnion
. That would allow us to chain discriminatedUnion
. We might call that version of discriminatedUnion
discriminatedObjectUnion
.
The value of the property props
of the result of discriminatedObjectUnion
could be the intersection of the properties of the list of the object of each objects in the parameters ...vs: VS
.
Also it would be great to make the ObjectValidator
type public.