Fork me on GitHub
#clojure-spec
<
2019-11-17
>
tianshu13:11:43

in spec2, should {:closed true} be available for schema spec?

(s/def ::user (s/schema [::name ::age]))

;;; contains? not supported on type: java.lang.Boolean
(s/valid? ::user {::name "cat" ::age 10} {:closed true})

(s/def ::complete-user (s/select ::user [*]))

;;; ok
(s/valid? ::complete-user {::name "dog" ::age 15} {:closed true})

Alex Miller (Clojure team)15:11:37

It’s a set of schema names, not a boolean

coder4633422:11:12

Hi! Is there a way to spec a return type of Promise<something> ? I would need this in quite a few places using cljs