   data and returns the result as a string as well as the _kind_ of data in the
   template (e.g. `:html`). Data keys of the form `:one-two` are converted into
   template variables of the form `oneTwo`."
-  [templates template-name data]
+  [^SoyTofu templates ^String template-name data]
   (let [content (.. templates
                     (newRenderer template-name)
                     (setData (camelize-keys data))

            [clojure.set :as set]
            [clojure.string :as string]
            [clojure.walk :as walk])
  (:import (com.google.template.soy SoyFileSet)
           (com.google.template.soy.data SanitizedContent$ContentKind
                                         UnsafeSanitizedContentOrdainer)
           (com.google.template.soy.shared SoyGeneralOptions)))

(def ^:private template-cache
  "Default to keeping the 32 most-used templates in cache."

    (string/join (cons (string/lower-case (first uc)) (next uc)))))

(defn- camelize-keys
  ^java.util.Map [m]
  (let [f (fn [[k v]] (if (keyword? k) [(camel-case k) v] [k v]))]
    ;; only apply to maps
    (walk/postwalk (fn [x] (if (map? x) (into {} (map f x)) x)) m)))
