cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
dnolen 2019-09-12T16:30:35.091300Z

Had a couple of hours of uninterrupted hacking in Berlin

dnolen 2019-09-12T16:30:54.091800Z

type inference of Closure return values works

dnolen 2019-09-12T16:31:24.092500Z

arity checking, REPL affordances - (i.e. doc strings) also works

14
mfikes 2019-09-12T17:34:33.093200Z

Nice πŸ™‚

mfikes 2019-09-12T17:45:49.093500Z

Here’s a regression to track down: https://clojure.atlassian.net/browse/CLJS-3165

mfikes 2019-09-12T17:48:54.093900Z

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"

πŸ‘ 1
πŸ†’ 1
🦜 8
mfikes 2019-09-12T17:49:38.094200Z

πŸ‘

mfikes 2019-09-12T17:52:09.094700Z

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"