ns-imports

macrosince v1.9.854 clojure.core/ns-importsEdit
(ns-imports quoted-ns)

Source docstring:
Returns a map of the import mappings for the namespace.
Source code @ clojurescript:src/main/clojure/cljs/core.cljc
(core/defmacro ns-imports
  [quoted-ns]
  (core/assert (core/and (seq? quoted-ns)
                         (= (first quoted-ns) 'quote)
                         (core/symbol? (second quoted-ns)))
    "Argument to ns-imports must be a quoted symbol")
  (core/let [ns (second quoted-ns)]
    `(into {}
       [~@(map
            (core/fn [[ctor qualified-ctor]]
              `[(symbol ~(name ctor)) ~(symbol qualified-ctor)])
            (get-in @env/*compiler* [:cljs.analyzer/namespaces ns :imports]))])))