clojure-spec

About: http://clojure.org/about/spec Guide: http://clojure.org/guides/spec API: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html
achikin 2020-02-07T15:47:34.170500Z

How do I check for exact value?

alexmiller 2020-02-07T15:47:51.171100Z

#{:foo} is a valid spec

alexmiller 2020-02-07T15:47:58.171300Z

a set containing one value

achikin 2020-02-07T15:48:04.171500Z

Thank you!

achikin 2020-02-07T15:48:47.172300Z

As far as I can understand if it’s a boolean I can do (s/def :mykey true?) right?

alexmiller 2020-02-07T16:03:15.172600Z

prob better to use boolean?

denik 2020-02-07T16:15:10.174700Z

I'm trying to get the spec (or any spec) from cljs.core.specs.alpha but

(ns my-ns
  (:require [clojure.spec.alpha :as s]
            [cljs.core.specs.alpha :as cljs-specs]))

(s/form ::cljs-specs/local-name)
throws
Error: Unable to resolve spec: :cljs.core.specs.alpha/local-name
Why this is happening? the spec is defined: https://github.com/clojure/clojurescript/blob/ef32778989f7ba2311a1e8a5d99c30e6805f5719/src/main/cljs/cljs/core/specs/alpha.cljc#L16