This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-01
Channels
- # aws (2)
- # aws-lambda (18)
- # beginners (68)
- # boot (6)
- # cider (2)
- # clara (2)
- # clojars (27)
- # clojure (68)
- # clojure-austin (5)
- # clojure-berlin (6)
- # clojure-dev (28)
- # clojure-greece (7)
- # clojure-italy (46)
- # clojure-japan (3)
- # clojure-nl (1)
- # clojure-russia (8)
- # clojure-sg (1)
- # clojure-spec (17)
- # clojure-uk (86)
- # clojurescript (82)
- # community-development (2)
- # cursive (18)
- # datomic (11)
- # duct (5)
- # fulcro (254)
- # garden (2)
- # graphql (6)
- # hoplon (19)
- # instaparse (4)
- # kekkonen (2)
- # leiningen (4)
- # luminus (3)
- # lumo (9)
- # off-topic (28)
- # om (7)
- # onyx (38)
- # other-languages (27)
- # portkey (7)
- # protorepl (1)
- # re-frame (56)
- # reagent (64)
- # ring (14)
- # ring-swagger (7)
- # shadow-cljs (255)
- # sql (2)
- # vim (11)
- # yada (10)
You don’t
https://github.com/lab-79/clojure-spec-helpers/blob/f3d7c48c55bbe4dc901cd7f1ace1e02b3777bd1b/src/lab79/clojure_spec_helpers.cljc#L61 This solved my issue for now
Does clojure/spec have a predicate that matches g/simple-type
?
but no more
i.e. doesn’t match complex (collection) types
no, but (def simple? (comp not coll?))
is a good first approximation
yep, gooder
well, mine was shorter :)
“complement” is a long word :)
am I right to understand that you can’t document keys with (s/keys :opt [::some-key])
without also providing the spec for ::some-key?
It won't generate without a spec for ::some-key
but it will validate just fine -- it will treat missing specs as any?
I believe.
^ @uwo is that the scenario you are asking about?
@seancorfield yes! that’s the way I thought/hoped it worked, but I was calling s/assert
in some clojurescript code and it was complaining about some keys that I had declared in s/keys, but that did not have their own spec.
@alexmiller those were some meaningful tweets