ns-imports
(ns-imports quoted-ns)
Source docstring:
Returns a map of the import mappings for the namespace.
(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]))])))