(defn type?
#?(:cljs {:tag boolean})
[env t]
;; don't use resolve-existing-var to avoid warnings
(when (and (some? t) (symbol? t))
(let [var (resolve-var env t)]
(if-some [type (:type var)]
type
(if-some [type (-> var :info :type)]
type
(if-some [proto (:protocol-symbol var)]
proto
(get '#{cljs.core/PersistentHashMap cljs.core/List} t)))))))