     :ecmascript-next CompilerOptions$LanguageMode/ECMASCRIPT_NEXT))
 
 (defn set-options
-  [^CompilerOptions closure-opts opts]
+  [^CompilerOptions closure-opts opts state]
 
   (when-let [level
              (case (:optimizations opts)

          ;; (js/React...) will otherwise just work without externs
          (.setWarningLevel DiagnosticGroups/UNDEFINED_VARIABLES CheckLevel/WARNING))]

    (set-options closure-opts compiler-options)

    (when source-map?
      ;; FIXME: path is not used at all but needs to be set


  (when (contains? opts :closure-warnings)
    (doseq [[type level] (:closure-warnings opts)]
      (let [group (get warning-types type)
            check-level (get check-levels level)]
        (if-not (and group check-level)
          (util/warn state {:type ::invalid-closure-warning :key type :level level})
          (. closure-opts (setWarningLevel group check-level))))))

  (when (contains? opts :closure-extra-annotations)
    (. closure-opts (setExtraAnnotationNames (map name (:closure-extra-annotations opts)))))
