Had a couple of hours of uninterrupted hacking in Berlin
type inference of Closure return values works
arity checking, REPL affordances - (i.e. doc strings) also works
Nice π
Hereβs a regression to track down: https://clojure.atlassian.net/browse/CLJS-3165
Thatβs awesome
cljs.user=> (require '[goog.string :as gstr])
nil
cljs.user=> (dir gstr)
...
unescapeEntities
unescapeEntitiesWithDocument
urlDecode
urlEncode
whitespaceEscape
nil
cljs.user=> (doc gstr/trim)
-------------------------
goog.string/trim
([str])
/**
* Trims white spaces to the left and right of a string.
* @param {string} str The string to trim.
* @return {string} A trimmed copy of {@code str}.
*/
nil
cljs.user=> (gstr/trim "a " "b ")
WARNING: Wrong number of args (2) passed to goog.string/trim at line 1 <cljs repl>
"a"
cljs.user=> (+ (gstr/trim "a ") 3)
WARNING: cljs.core/+, all arguments must be numbers, got [string number] instead at line 1 <cljs repl>
"a3"
π
For reference, the currently shipping behavior:
cljs.user=> (require '[goog.string :as gstr])
nil
cljs.user=> (dir gstr)
nil
cljs.user=> (doc gstr/trim)
-------------------------
goog.string/trim
nil
nil
cljs.user=> (gstr/trim "a " "b ")
"a"
cljs.user=> (+ (gstr/trim "a ") 1)
"a1"