Fork me on GitHub
#cljs-dev
<
2021-11-06
>
lilactown15:11:22

can we still assume that goog/DEBUG is globally available?

thheller15:11:09

yes, they technically can't move that to a module. can't goog.module without the goog 😛

lilactown15:11:13

and what's the recommended fix for macros that need to set some JS property? I need to define my own fn in a cljs namespace?

thheller15:11:38

unchecked-set or set!

lilactown15:11:37

TIL unchecked-set

borkdude15:11:21

Macro
  INTERNAL.
;)

lilactown15:11:23

my favorite kind of macro

thheller15:11:03

note that anything you unchecked-set you always need to unchecked-get later too if accessed anywhere in the CLJS code. consistent property access and so on

thheller15:11:36

if you are just doing this for some JS lib thats fine

lilactown15:11:59

I'm trying out set! for now

lilactown15:11:17

I only use it to set the displayName property of React components in dev, so it should be fine

thheller15:11:26

should be fine with set! yeah since :advanced should strip it anyways