plumatic/schema

Use goog.object/get/set instead of aget/aset

danielcompton opened this issue · 2 comments

  • This is a bug report (with instructions to reproduce) or other issue with the code
    (if this is a question or feature request, please do not open an issue and post on the mailing list instead).

ClojureScript now warns on the use of aget/aset with non-integer indexes. I think this code should move to using goog.object/get and set instead?

(defn declare-class-schema! [klass schema]
(aset klass "schema$utils$schema" schema))
(defn class-schema [klass]
(aget klass "schema$utils$schema")))

More info: https://clojurescript.org/news/2017-07-14-checked-array-access

w01fe commented

Sounds right to me, thanks for the report! (PR welcome!)

w01fe commented

Let me know if this is / starts being actively annoying and I can cut a release. Thanks again for the report.