Hi, in CLJS, nothing happens when I run this:
(defn foo
{:malli/schema [:=> :int :int]}
[x]
(inc x))
(foo :a)
Shouldn’t there be an error printed in the js console ? Is there a special setup to enable :malli/schema ?
Edit: that’s describe in the docs here https://github.com/metosin/malli/blob/master/docs/function-schemas.mdyou're looking for instrumentation
https://github.com/metosin/malli/blob/master/docs/function-schemas.md#instrumentation
It seems like (mi/collect) always return an empty set.
unfortunately I haven't used instrumentation on the cljs side so I can't help you
I get this error in clojurescript when I bump the malli version from 0.14.0 to 0.17.0:
[:app] Configuring build.
[:app] Compiling ...
[:app] Build failure:
The required namespace "clojure.math" is not available, it was required by "malli/transform.cljc".
deps:
:deps org.clojure/clojure {:mvn/version "1.10.1"}
org.clojure/clojurescript {:mvn/version "1.11.4"}looking at the cljs changelog, clojure.math only gets introduced in 1.11.51
and in clojure 1.11
malli requires clojure 1.11
I'll add a note to the README about cljs 1.11.51
sorry about the confusion 🙂
readme now updated