File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 4
4
cider/cider-nrepl {:mvn/version " 0.28.3" }
5
5
org.babashka/sci {:mvn/version " 0.6.37" }
6
6
reagent/reagent {:mvn/version " 1.1.1" }
7
- io.github.babashka/sci.configs {:git/sha " b5335b79c237344d003f16358321197a0b0a2ac6 " }
7
+ io.github.babashka/sci.configs {:git/sha " 0702ea5a21ad92e6d7cca6d36de84271083ea68f " }
8
8
io.github.nextjournal/clojure-mode {:git/sha " ac038ebf6e5da09dd2b8a31609e9ff4a65e36852" }
9
9
metosin/reitit-frontend {:mvn/version " 0.5.15" }
10
10
thheller/shadow-cljs {:mvn/version " 2.20.11" }}}
Original file line number Diff line number Diff line change 106
106
(sci/add-import! ctx ns sub-libname r))))
107
107
{:handled true })))
108
108
109
+ (defn ^:macro implements?* [_ _ psym x]
110
+ ; ; hardcoded implementation of implements? for js-interop destructure which
111
+ ; ; uses implements?
112
+ (case psym
113
+ cljs.core/ISeq (implements? ISeq x)
114
+ cljs.core/INamed (implements? INamed x)
115
+ (list 'cljs.core/instance? psym x)))
116
+
117
+ (def core-ns (sci/create-ns 'clojure.core nil ))
118
+
109
119
(def initial-sci-opts
110
120
{:async? true
111
121
:load-fn load-fn
118
128
'v 'nextjournal.clerk.viewer
119
129
'p 'nextjournal.clerk.parser}
120
130
:namespaces (merge {'nextjournal.clerk.viewer viewer-namespace
121
- 'clojure.core {'read-string read-string}}
131
+ 'clojure.core {'read-string read-string
132
+ 'implements? (sci/copy-var implements?* core-ns)}}
122
133
(sci-copy-nss
123
134
'nextjournal.clerk.parser
124
135
'nextjournal.clerk.render
You can’t perform that action at this time.
0 commit comments