cljs.math/increment-exact

functionsince v1.11.50Edit
(increment-exact a)

Source docstring:
Returns a incremented by 1, throws ArithmeticException on overflow.
Source code @ clojurescript:src/main/cljs/cljs/math.cljs
(defn ^number increment-exact
  {:added "1.11.10"}
  [a]
  (if (or (>= a js/Number.MAX_SAFE_INTEGER) (< a js/Number.MIN_SAFE_INTEGER))
    (throw (ex-info "Integer overflow" {:fn "increment-exact"}))
    (inc a)))