File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 26362636 ; ; Cannot determine type of the target
26372637 (when (and (get-in env [:locals target])
26382638 (or (nil? target-tag)
2639- ('#{any} target-tag)))
2639+ ('#{any} target-tag)))
26402640 (warning :infer-warning env
26412641 {:warn-type :target :form form}))
26422642 ; ; Unresolveable property on existing extern
Original file line number Diff line number Diff line change 825825 (map (comp :externs second)
826826 (get @test-cenv ::a/namespaces ))))))
827827
828- ; ; TODO: test (def foo (js/require "bar.js")) pattern
828+ ; ; FIXME: we don't get an extern for Component
829+ (let [test-cenv (atom {::a/externs (externs/externs-map
830+ (closure/load-externs
831+ {:externs [" src/test/externs/test.js" ]}))})]
832+ (binding [a/*cljs-ns* a/*cljs-ns*
833+ a/*cljs-warnings* (assoc a/*cljs-warnings* :infer-warning true )]
834+ (e/with-compiler-env test-cenv
835+ (a/analyze-form-seq
836+ '[(ns foo.core )
837+ (def React (js/require " react" ))
838+ (.log js/console (.-Component React))]))
839+ (cc/emit-externs
840+ (reduce util/map-merge {}
841+ (map (comp :externs second)
842+ (get @test-cenv ::a/namespaces ))))))
829843
830844 )
You can’t perform that action at this time.
0 commit comments