         content
         ))))
 
-(defn find-package-json [file]
+(defn find-package-json [^File file]
   (loop [root (if (.isDirectory file)
                 (.getParentFile file)
                 file)]

         (string? require)
         (map? require-ctx)]}

  (let [file (find-file npm require-from require)]
    (cond
      (nil? file)
      nil

      ;; rxjs/Observable.js
      ;; must find file before dir
      :else
      (let [^File file-or-dir
            (or (test-file-exts npm package-dir suffix)
                (test-file package-dir suffix))

            ^File file
            (if-not (and file-or-dir (.isDirectory file-or-dir))
              file-or-dir
              (test-file-exts npm file-or-dir "index"))]
