   (:import (shadow.util FileWatcher)
            (java.io File)))
 
-
 (defn service? [x]
   (and (map? x)
        (::service x)))
 
-(defn poll-changes [{:keys [dir watcher]}]
+(defn poll-changes [{:keys [dir ^FileWatcher watcher]}]
   (let [changes (.pollForChanges watcher)]
     (when (seq changes)
       (->> changes


        watch-dirs
        (->> directories
             (map (fn [dir]
                    {:dir dir
                     :watcher (FileWatcher/create dir (vec file-exts))}))
             (into []))]

                   :file (io/file dir name)
                   :event event}))
           ;; ignore empty files
           (remove (fn [{:keys [event ^File file] :as x}]
                     (and (not= event :del)
                          (zero? (.length file)))))
           ))))
