This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-05
Channels
- # bangalore-clj (5)
- # beginners (77)
- # boot (29)
- # cider (11)
- # clojure (110)
- # clojure-dev (5)
- # clojure-greece (1)
- # clojure-poland (1)
- # clojure-russia (11)
- # clojure-spec (1)
- # clojurescript (143)
- # clojurex (1)
- # core-async (1)
- # css (1)
- # cursive (40)
- # data-science (1)
- # datomic (6)
- # figwheel (4)
- # fulcro (45)
- # immutant (5)
- # off-topic (4)
- # onyx (8)
- # portkey (9)
- # re-frame (112)
- # shadow-cljs (30)
- # spacemacs (3)
i see some new infer-externs warnings that I didn’t before. Not sure what to do about these defprotocol
warnings:
------ WARNING #3 --------------------------------------------------------------
File: re_view/hiccup/core.cljs:14:1
--------------------------------------------------------------------------------
10 | js/Symbol
11 | (-pr-writer [sym writer _]
12 | (-write writer (str "\"" (.toString sym) "\"")))))
13 |
14 | (defprotocol IElement
-------^------------------------------------------------------------------------
Cannot infer target type in expression (. this re-view$hiccup$core$IElement$to-element$arity$1 this)
--------------------------------------------------------------------------------
15 | (to-element [this] "Returns a React element representing `this`"))
16 |
17 | (defprotocol IEmitHiccup
18 | (to-hiccup [this] "Returns a hiccup form representing `this`"))
19 |
source: https://github.com/braintripping/re-view/blob/master/re_view/src/re_view/hiccup/core.cljs#L14also
------ WARNING #6 --------------------------------------------------------------
File: re_view/hiccup/core.cljs:34:9
--------------------------------------------------------------------------------
30 | (println form)
31 | (.error js/console e)))
32 |
33 |
34 | (satisfies? IElement form)
---------------^----------------------------------------------------------------
Cannot infer target type in expression (. form -re-view$hiccup$core$IElement$)
--------------------------------------------------------------------------------
35 | (to-element form)
for something like this:
41 | (reduce (fn [out el]
42 | (doto out (.push (-to-element el)))) #js [] form)
-----------------------------------^--------------------------------------------
Cannot infer target type in expression (. G__33183 push (-to-element el))
--------------------------------------------------------------------------------
can ^js
annotations go inline, like (.push ^js (-to-element el))
or would implementations of -to-element
need to be annotatedfor the others I have to touch sooooo much code since its all generated all over the place
I kinda want to create one function to create the proper symbol and re-use that everywhere