register-pure: added code to enable spec checking of the fn args
This commit is contained in:
parent
48a1bda438
commit
1b698b3d8f
|
@ -35,9 +35,6 @@
|
||||||
(coll? data) (map deref data)
|
(coll? data) (map deref data)
|
||||||
:else @data))
|
:else @data))
|
||||||
|
|
||||||
(s/fdef register-pure
|
|
||||||
:args ::args)
|
|
||||||
|
|
||||||
(defn register-pure
|
(defn register-pure
|
||||||
"This fn allows the user to write a 'pure' subscription
|
"This fn allows the user to write a 'pure' subscription
|
||||||
i.e. that is a subscription that operates on the values within app-db
|
i.e. that is a subscription that operates on the values within app-db
|
||||||
|
@ -99,4 +96,9 @@
|
||||||
(subs/register ;; the simple case with no subs
|
(subs/register ;; the simple case with no subs
|
||||||
sub-name
|
sub-name
|
||||||
(fn [db q-vec d-vec]
|
(fn [db q-vec d-vec]
|
||||||
(ratom/make-reaction (fn [] (f @db q-vec d-vec))))))))
|
(ratom/make-reaction (fn [] (f @db q-vec d-vec))))))))
|
||||||
|
|
||||||
|
#_(s/fdef register-pure
|
||||||
|
:args ::args)
|
||||||
|
|
||||||
|
#_(s/instrument #'register-pure)
|
||||||
|
|
Loading…
Reference in New Issue