cljs.spec/def

MOVED, please see cljs.spec.alpha/def
macroremoved v1.9.542added v1.9.14Edit
(def k spec-form)

Source docstring:
Given a namespace-qualified keyword or resolveable symbol k, and a spec,
spec-name, predicate or regex-op makes an entry in the registry mapping k to
the spec
Source code @ clojurescript:src/main/cljs/cljs/spec.cljc
(defmacro def
  [k spec-form]
  (let [k    (if (symbol? k) (ns-qualify &env k) k)
        form (res &env spec-form)]
    (swap! registry-ref assoc k form)
    `(def-impl '~k '~form ~spec-form)))