How do I do an ::Anything
spec in Clojurescript? In Clojure I have (s/def ::Anything #(instance? Object %))
@ballpark any?
note that your ::Anything
spec will not tolerate nil
Thanks, Yeah, I'll have to do a parity match on those
just to be clear: the answer in both dialects is any?
.
right, thanks, here's what I changed it to for my cljc file: (s/def ::Anything #(s/and some? any?))
This way I can specify s/nilable
in the specs that reference ::Anything
. Seem like an ok solution to you?
it seems a little weird to me. why not just use some?
and any?
directly?
Yes, that's it! Something seemed wrong to me too, thanks again!
s/and with any? as an item is exactly equivalent to just the rest of the items