Fork me on GitHub
#clojurescript
<
2021-04-02
>
witek12:04:07

I have a namespace with pure functions and no requires. Now I would like to write "Rich comments" in this namespace. But I would like to use definitions from an other namespace to reuse some test data. Is there a way to require/refer namespaces just in the (comment ...) block?

p-himik12:04:18

(require '[x :as y])

p-himik12:04:49

Ah, sorry - didn't notice the channel is CLJS.

p-himik12:04:21

(require ...) doesn't work in not self-hosted environments. But since the comment will probably be used only when working with a CLJS REPL, and there (require ...) might work, I'm not sure.

lilactown13:04:04

require works in CLJS REPLs, just not at compile time

👍 3