Re:All I Want for Christmas Is These Seven TypeScript Improv...
by Gigachad on Monday December 26, 2022 @12:07AM
(#34134781)
Your setup must not be right. The one I’m using at work reloads the page when I save in the editor so by the time I switch to the browser window it’s already loaded. Basically no perceivable compile time.
[ Parent
| on HN ]
Re:All I Want for Christmas Is These Seven TypeScript Improv...
by Beltalowda on Monday December 26, 2022 @12:44AM
(#34134957)
Yes, and that is a world of complexity that manages all of that behind the scenes.
The fact that you need to "setup" anything is already a problem. I want stuff to Just Work. No extra processes. No extra steps. Nothing to update. Works today, works in five years. Just start one process and it will work. I don't understand what's so hard to grasp about that.
This is trivial to do with a compiler that has an okay-ish (not even "fast") performance. It's not feasible with TypeScript today, even for fairly simple applications with a few hundred lines of code.
Re:All I Want for Christmas Is These Seven TypeScript Improv...
by solarkraft on Monday December 26, 2022 @01:08AM
(#34135120)
tsc is slow (and that's a shame), but there are Typescript compilers like swc that are quite fast.
It's totally reasonable to keep your setup simple, all that complexity is often not required. It only really pays off on larger projects (it's super simple to set up nowadays though).
Re:All I Want for Christmas Is These Seven TypeScript Improv...
by Beltalowda on Monday December 26, 2022 @01:33AM
(#34135280)
I believe swc only compiles TypeScript, but doesn't actually perform any type checking (same as esbuild)? You can make tsc a bit less slow by disabling type checking (it's still slow, but less), but it seems to me that kind of defeats the point of using TypeScript in the first place. It's nice for creating builds, but not very useful during development.