Fork me on GitHub

I can't figure that (0, whatever). Why does typescript do that, what's the trick?

David Vujic09:10:25

Is it the compiled/transpiled output to ES5? In that case, it might have to do with references, function calls and the this thing 😄


why they started doing this I don't know exactly


I expect it has something to do with matching how ESM imported functions are called


hello 👋 . I would appreciate your help here but I'm not certain if I have given enough info/context


actually found a solution for this

Otto Nascarella18:10:46

hi there sorry if I am asking something really stupid… when you configure your shadow-cljs project to run tests in the browser, it compiles all tests to a single file. are there intermediate steps for that compilation? I’ve been feeling that it is getting slower and slower as the project grows.


I don't understand the question? I mean the more code you have the more time it is going to take to compile? do you use watch in which case it shouldn't matter much since its incremental and only recompiles what changes?


but I do agree that there needs to be a better test runner that doesn't always run all the tests. just need time to build it 😛

🕓 1
Otto Nascarella19:10:32

yeah. compilation has watch. and we have some sort of way to choose the namespaces we wanna run tests on. but on each save, it takes quite a lot to change the interface…

Otto Nascarella19:10:59

my point was… the target folder you see each module from cljs-runtime in a separate js file. whereas the test files are all in one bundle.

Otto Nascarella19:10:39

in fact, it does have each module in a file (TIL)


I don't understand why you want that though? it actually performs worse to load many files instead of one


but in watch is only hot-reloads the files that changes anyways so that is entirely different thing that is also much faster

Brandon Olivier21:10:01

has anybody used shadow-cljs much with electron?

Brandon Olivier21:10:24

I’m having a lot of issues import ipcRenderer but, based on the electron docs themselves, I don’t understand why.,

Brandon Olivier23:10:23

In case anybody else has the same problem, I figured it out. You can no longer directly access ipcRenderer through electron in the renderer process. You have to access it in a “preload script” which you can access when you start the browser window. I just created a resources/preload.js file and added ipcRenderer to the window object.


are you sure you are "allowed" to do that? I mean that to me seems to represent the security issue that preload scripts are supposed to prevent?


I haven't looked at electron stuff in a long time (long before preload scripts) but it might be feasible to create a special :target for this. too busy currently to figure it out though