                 :simple CompilationLevel/SIMPLE_OPTIMIZATIONS)
         compiler-options (doto (CompilerOptions.)
                            (.setCodingConvention (ClosureCodingConvention.)))]
+    (when (contains? opts :closure-warnings)
+      (doseq [[type level] (:closure-warnings opts)]
+        (. compiler-options
+          (setWarningLevel (type warning-types) (level check-level)))))
     (when (contains? opts :source-map)
       (set! (.sourceMapOutputPath compiler-options)
             (:source-map opts))

    (set! (.printInputDelimiter compiler-options)
      (:print-input-delimiter opts))))

(defn make-options
  "Create a CompilerOptions object and set options from opts map."
  [opts]
  (let [level (case (:optimizations opts)

           com.google.javascript.jscomp.JSSourceFile
           com.google.javascript.jscomp.Result
           com.google.javascript.jscomp.JSError
           com.google.javascript.jscomp.CheckLevel
           com.google.javascript.jscomp.DiagnosticGroups
           com.google.javascript.jscomp.CommandLineRunner))

(defmacro ^:private debug-prn
