This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-23
Channels
- # bangalore-clj (5)
- # beginners (136)
- # boot (1)
- # bristol-clojurians (6)
- # cider (46)
- # cljs-dev (172)
- # cljsrn (35)
- # clojure (82)
- # clojure-china (2)
- # clojure-dev (9)
- # clojure-dusseldorf (1)
- # clojure-finland (15)
- # clojure-italy (54)
- # clojure-norway (4)
- # clojure-russia (6)
- # clojure-spec (19)
- # clojure-uk (61)
- # clojurebridge (1)
- # clojurescript (55)
- # community-development (23)
- # cursive (7)
- # datomic (19)
- # emacs (10)
- # events (4)
- # fulcro (108)
- # graphql (7)
- # hoplon (1)
- # leiningen (7)
- # lumo (14)
- # off-topic (68)
- # onyx (23)
- # parinfer (8)
- # portkey (40)
- # precept (11)
- # re-frame (5)
- # reagent (40)
- # ring-swagger (5)
- # shadow-cljs (58)
- # specter (5)
- # tools-deps (37)
- # unrepl (13)
- # vim (9)
- # yada (12)
Are there any differences in using spec in clojure and clojurescript? Theres a cljs.spec.alpha
namespace
I believe that ClojureScript is supposed to do an automatic mapping from clojure.*
namespaces to cljs.*
namespaces so I would expect you could just write .cljc
files with a require
of clojure.spec.alpha
and it should just work...
(caveat: I don't do anything with cljs so I might be talking nonsense)
I believe that is correct, I just pull in clojure.spec.alpha, and it works in clj, cljs, and cljc
that’s the idea
Is there a way to not have this conform in the two options but just pass through as it is?
(s/def :dropdown.option/id (s/or :s string?
:k keyword?))
(s/def ::s-or-n
(s/and (s/or :s string? :n number?)
(s/conformer second)))
(s/conform ::s-or-n "hey")
=> "hey"
was what I was suggesting but not sure if that’s a terrible idea or notCurrently that’s undocumented
I think we will ultimately either doc it or make a nonconforming or