Skip to content

Commit dbd147e

Browse files
committed
Get rid of shadow infer warnings
1 parent 0a32db8 commit dbd147e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
:shadow
4646
{:main-opts ["-m" "shadow.cljs.devtools.cli"]
47-
:extra-deps {thheller/shadow-cljs {:mvn/version "2.18.0"}}}
47+
:extra-deps {thheller/shadow-cljs {:mvn/version "3.2.0"}}}
4848

4949
:build
5050
{:ns-default build

src/nextjournal/markdown/impl.cljs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@
120120
(push-node (text-node c))
121121
close-node)))
122122

123-
(defn footnote-label [{:as _ctx ::keys [footnote-offset]} token]
123+
(defn footnote-label [{:as _ctx ::keys [footnote-offset]} ^js token]
124124
;; TODO: consider initial offset in case we're parsing multiple inputs
125125
(or (.. token -meta -label)
126126
;; inline labels won't have a label
127127
(str "inline-note-" (+ footnote-offset (.. token -meta -id)))))
128128

129129
;; footnotes
130-
(defmethod apply-token "footnote_ref" [{:as ctx ::keys [label->footnote-ref]} token]
130+
(defmethod apply-token "footnote_ref" [{:as ctx ::keys [label->footnote-ref]} ^js token]
131131
(let [label (footnote-label ctx token)
132132
footnote-ref (or (get label->footnote-ref label)
133133
{:type :footnote-ref :inline? (not (.. token -meta -label))
@@ -137,7 +137,7 @@
137137
(u/update-current-loc z/append-child footnote-ref)
138138
(update ::label->footnote-ref assoc label footnote-ref))))
139139

140-
(defmethod apply-token "footnote_open" [ctx token]
140+
(defmethod apply-token "footnote_open" [ctx ^js token]
141141
;; TODO unify in utils
142142
(let [label (footnote-label ctx token)]
143143
(-> ctx
@@ -268,7 +268,7 @@ _this #should be a tag_, but this [_actually #foo shouldnt_](/bar/) is not."
268268
;; region data builder api
269269
(defn pairs->kmap [pairs] (into {} (map (juxt (comp keyword first) second)) pairs))
270270
(defn apply-tokens [doc tokens]
271-
(let [mapify-attrs-xf (map (fn [x]
271+
(let [mapify-attrs-xf (map (fn [^js x]
272272
(set! x -attrs (pairs->kmap (.-attrs x)))
273273
x))]
274274
(reduce (mapify-attrs-xf apply-token) doc tokens)))

0 commit comments

Comments
 (0)