I have some code in cljc files which compiles to both Clojure and ClojureScript.
in protocols.cljc
(defprotocol Transformable ".."
(scale [this scalar] "" ) ...)
in pattern.cljc
(defrecord APattern [paths]
Transformable
(scale [this s] (...)) ...)
in another.cljc
(defn f [pattern] (.scale pattern (/ 1 2)) )
And in core.cljs
(another/f pattern)
However, I'm getting an error on the browser console
TypeError: pattern.scale is not a function
Checking the fields of pattern object in core.cljs (using js-keys) shows me that the object has something called
"patterning$protocols$Transformable$scale$arity$2"
which looks like my function. So am I just doing something wrong to access it in ClojureScript? Does . notation not work? Do I need to do something else?