(defn js-tag
([pre]
(js-tag pre :tag))
([pre tag-type]
(js-tag pre tag-type (get @env/*compiler* ::externs)))
([pre tag-type externs]
(js-tag pre tag-type externs externs))
([pre tag-type externs top]
(when-let [[p externs' :as me] (find externs (first pre))]
(let [tag (-> p meta tag-type)]
(if (= (count pre) 1)
(when tag (symbol "js" (str (alias->type tag tag))))
(or (js-tag (next pre) tag-type externs' top)
(js-tag (into '[prototype] (next pre)) tag-type (get top tag) top)))))))