Open ikitommi opened 8 years ago
At least union, intersection, difference. Should handle optional & required keys and values and handle incompatible types gracefully.
union
intersection
difference
(st/union {:id s/Str, (s/optional-key :name) s/Str, :size (s/enum :S :M)} {:id s/Str, :name s/Str. :size (s/maybe (s/enum :S :M))}) ; {:id s/Str ; :name s/Str ; :size (s/enum :S :M)} (st/union {:id s/Str} {:id s/Int}) ; FAIL (st/union {:id s/Str} {:id s/Int} s/either) ; {:id (s/either s/Str s/Int)}
At least
union
,intersection
,difference
. Should handle optional & required keys and values and handle incompatible types gracefully.