r/javascript • u/Waltex • Dec 05 '25
The missing standard library for multithreading in JavaScript
https://github.com/W4G1/multithreading
146
Upvotes
r/javascript • u/Waltex • Dec 05 '25
View all comments
1
u/Fidodo Dec 06 '25
That's awesome and I've been looking for something like this. How did you get the inline functions to work as a worker? Normally workers need their own file right? How does closure scope work with typescript? Do you need to carefully track which variables are in and out of scope to avoid errors? Can the compiler somehow contain the scope of the inline function?