Skip to content

Commit

Permalink
Enable spec-tools to work with babashka
Browse files Browse the repository at this point in the history
  • Loading branch information
arichiardi committed Dec 4, 2023
1 parent 7a3b59e commit 7495190
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{:paths ["src"]}
6 changes: 3 additions & 3 deletions src/spec_tools/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,9 @@
(let [data (clojure.core/merge {:spec form} (extra-spec-map this))]
`(spec-tools.core/spec ~data)))

IFn
#?(:clj (invoke [this x] (if (ifn? spec) (spec x) (fail-on-invoke this)))
:cljs (-invoke [this x] (if (ifn? spec) (spec x) (fail-on-invoke this)))))
#?@(:bb []
:clj [IFn (invoke [this x] (if (ifn? spec) (spec x) (fail-on-invoke this)))]
:cljs [IFn (-invoke [this x] (if (ifn? spec) (spec x) (fail-on-invoke this)))]))

#?(:clj
(defmethod print-method Spec
Expand Down

0 comments on commit 7495190

Please sign in to comment.