Fork me on GitHub
#cljs-dev
<
2022-05-17
>
timothypratley17:05:26

Just a heads up, another missing extern inference case: https://clojure.atlassian.net/browse/CLJS-3377

(defonce ^js elk (new elkjs (clj->js {:algorithms algorithms})))
^js should not be necessary here

dnolen17:05:28

@timothypratley thanks for the report

😄 1
dnolen17:05:47

indeed new case in the analyzer does not preserve the tag on the constructor

😱 1
timothypratley20:05:41

nice!!! Thank you very much.

souenzzo16:05:09

Hey @U050B88UR I don't know exactly the implications of map js/Boolean to boolean, but new Boolean(false) actually returns an Object, that always evaluate to true. This wired case occurs in JVM: you can create a Boolean object and in a if it will always evaluate to true

dnolen16:05:26

@U2J4FRT2T that isn't relative to type inference though, that's just a runtime host behavior thing