 
 (defn stop-component!
   "Stops the given `component` of the given `system`."
-  [^IPersistentMap system-map ^IComponent component]
+  [#?(:clj ^IPersistentMap) system-map
+   #?(:clj ^IComponent)     component]
   (reduce stop-component!
           (update-in system-map
                      [:components (hcomp/get-name component)]

  (if (s/valid? :hellhound.component/component component)
    [(hcomp/get-name component) (hcomp/initialize component)]
    ;; If component did not satisfies component spec
    (throw (ex-info "Component does not satisfies ':hellhound.component/component' spec."
                    {:cause (hcomp/get-name component)
                     :explain (s/explain-data :hellhound.component/component component)}))))

   [hellhound.logger           :as log]
   [hellhound.component        :as hcomp])


  #?(:clj (:import
           (hellhound.component IComponent)
           (clojure.lang IPersistentMap
                         PersistentArrayMap
                         PersistentVector))))

;; Main storage for system data.
(def system (atom {}))
