This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-02
Channels
- # asami (24)
- # babashka (85)
- # beginners (137)
- # calva (46)
- # cider (16)
- # clj-kondo (19)
- # cljs-dev (7)
- # clojure (13)
- # clojure-australia (1)
- # clojure-europe (10)
- # clojure-nl (4)
- # clojure-spec (6)
- # clojure-uk (3)
- # clojurescript (5)
- # conjure (21)
- # cursive (15)
- # datascript (46)
- # datomic (13)
- # depstar (32)
- # figwheel-main (1)
- # fulcro (6)
- # honeysql (20)
- # lsp (53)
- # malli (7)
- # meander (9)
- # off-topic (35)
- # other-languages (1)
- # polylith (41)
- # re-frame (5)
- # reagent (4)
- # releases (3)
- # rewrite-clj (2)
- # shadow-cljs (22)
- # spacemacs (15)
- # tools-deps (3)
- # xtdb (17)
Regarding the release draft I got one question. Is it possibile to name Window dependency in require as well? For instance I would rather use Promise then js/Promise.
That doesn't seem right
cljs.user=> (require '[goog$global.Promise])
Execution error (ExceptionInfo) at cljs.repl/ns->input (repl.cljc:203).
goog$global.Promise does not exist
don't know how its handled in CLJS directly. shadow-cljs also had a bug related to this when done in the REPL. works fine in regular code though, maybe the same situation for the normal CLJS REPL
replied to a thread:`window` is the default global in the browser so `goog$global.Promise` will work
That doesn't seem right
cljs.user=> (require '[goog$global.Promise])
Execution error (ExceptionInfo) at cljs.repl/ns->input (repl.cljc:203).
goog$global.Promise does not exist
Actually, having problems getting this to work at all from a browser repl I spun up:
❯ clj -Sdeps ' {:deps {org.clojure/clojurescript {:mvn/version "1.10.844"}}} ' -m cljs.main -r
WARNING: When invoking clojure.main, use -M
ClojureScript 1.10.844
cljs.user=> (require '[goog$global.Math :refer [max]])
Unexpected error (ExceptionInfo) compiling at (<cljs repl>:1:2).
Invalid :refer, var goog$global.Math/max does not exist at line 1 <cljs repl>