idonttrustlikethat icon indicating copy to clipboard operation
idonttrustlikethat copied to clipboard

discriminatedObjectUnion

Open gbersac opened this issue 4 months ago • 0 comments

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.

gbersac avatar Oct 01 '24 10:10 gbersac