is there any way to abstract a spec?
(defmacro to-many-ref-type
[spec]
`(s/coll-of (s/or :id u/id? :ident ::ident ~(keyword (name spec)) ~spec) :type vector?)))
(s/def :habit/tasks (to-many-ref-type ::task))
i'm trying this, but I think the macroexpansion of s/def doesn't like itactually, i think it's working - my issue is it's not working in cljs, I'll dig into it
CLJS macros can be a bit finicky! Check https://code.thheller.com/blog/shadow-cljs/2019/10/12/clojurescript-macros.html
That was my issue! I was trying to use a cljc file and updated them to separate cljs and clj files. it's working now 🙂