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"}The "extra-externs.js" file is there with valid externs.
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?
There's definitely some issue. If I run this, the extern gets picked up just fine and no inferred extern gets generated:
clj -M --main cljs.main --compile-opts "figwheel.cljs.edn" --compile app.mainI should note that I am using the latest release of figwheel-main: 0.2.16