This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-15
Channels
- # announcements (8)
- # architecture (9)
- # autochrome-github (1)
- # babashka (48)
- # beginners (55)
- # calva (36)
- # cider (16)
- # clj-commons (1)
- # clj-kondo (38)
- # cljs-dev (44)
- # cljsrn (1)
- # clojure (164)
- # clojure-europe (35)
- # clojure-nl (2)
- # clojure-norway (10)
- # clojure-uk (23)
- # clojurescript (50)
- # conjure (24)
- # core-async (1)
- # cryogen (2)
- # cursive (38)
- # datalevin (11)
- # datascript (2)
- # datomic (13)
- # duct (1)
- # emacs (16)
- # events (12)
- # exercism (3)
- # figwheel-main (7)
- # fulcro (26)
- # honeysql (5)
- # integrant (1)
- # jobs (3)
- # kaocha (6)
- # lsp (72)
- # malli (22)
- # nextjournal (35)
- # nrepl (1)
- # off-topic (34)
- # pathom (5)
- # polylith (8)
- # portal (40)
- # re-frame (14)
- # reagent (42)
- # reitit (1)
- # releases (1)
- # remote-jobs (1)
- # reveal (9)
- # sci (2)
- # shadow-cljs (13)
- # sql (3)
- # tools-deps (33)
- # vim (25)
I'm trying to add an externs file to my project, and it doesn't seem to make any sort of difference. It's almost like the compiler doesn't even know about it.
This is my figwheel config:
^{:watch-dirs ["src/cljs" "test"]
:auto-testing true
:extra-main-files {:guide {:main guide.main}}
:css-dirs ["target/public"]
:npm {:bundles {"target/app.bundle.js" "src/js/index.js"}}
:open-url false}
{:externs ["extra-externs.js"]
:infer-externs true
:main app.main
:output-dir "target/public/cljs-out"
:output-to "target/public/app.js"}
For example, if I add this code to my project:
(defn should-not-infer
[^js/FooBar foo]
(.someMethod foo 1 2 3))
And I have the following extra-externs.js
file:
var FooBar;
FooBar.prototype.someMethod;
I still see the extern get generated in the inferred_externs.js
file.Essentially I'm asking: What's the recourse for this situation? If Google decided not to include a valid symbol, how does one avoid getting stuck with a warning?