cljs.analyzer.api/the-ns

functionsince v1.12.35Edit
(the-ns ns)
(the-ns state sym)

Source docstring:
Given a namespace return the corresponding namespace analysis map, throwing an
exception if not found. Analagous to clojure.core/the-ns.
Source code @ clojurescript:src/main/clojure/cljs/analyzer/api.cljc
(defn the-ns
  ([ns]
   (the-ns env/*compiler* ns))
  ([state sym]
   {:pre [(symbol? sym)]}
   (or (find-ns state sym)
       (throw (ex-info (str "No namespace found: " sym) {:ns sym})))))