Fork me on GitHub

Hi! We're running into an issue with the type inference warnings (and the automatic externs inference, it appears) when we thread js field accesses with some-> instead of ->:

(def window (if (exists? js/window) js/window nil))
(def ^js jswindow (if (exists? js/window) js/window nil))

(js/console.log (-> js/window .-test))
(js/console.log (-> jswindow .-test))
(js/console.log (-> window .-test))

(js/console.log (-> js/window .-test .-identity))
(js/console.log (some-> js/window .-test .-identity))

(js/console.log (-> jswindow .-test .-identity))
(js/console.log (some-> jswindow .-test .-identity))

(js/console.log (-> window .-test .-identity)) ;; <---- Inference warning only here
(js/console.log (some-> window .-test .-identity))
It was observed on 2.8.68 and reproduced on 2.8.93. Is it expected/unavoidable?


not sure. please open an issue, can't look into that now.

👌 4

Done, thank you!