Fork me on GitHub
#squint
<
2022-09-13
>
didibus02:09:27

Pretty sure that was a big reason for why Clojurescript hasn't embraced ES6 modules yet

didibus02:09:37

Hum... What if you use Promise though? They automatically unroll?

didibus02:09:07

Or... dare I say, a class?

export default class ReplCommand {
  constructor() {}
  invoke() {
    return <code to eval here>;
  }
}
Now you can import foo.js and do new ReplCommand().invoke();

didibus02:09:36

Hum, nevermind those both have the same issue: return var foo = function ... I'm don't believe works either

lemuel15:09:54

Definitely worth it in my opinion. Very excited about having a proper REPL so close to JS