Hacker News new | ask | show | jobs
by swyx 1871 days ago
on the contrary - tsc is so slow that most people use babel to strip out types in production.
4 comments

What does "strip out types in production" means ? I've never heard of that.

For what I do, Babel is the slow part. switching babel to esbuild (still with tsc) divided my build times by 10.

The types aren't real anyway, what is there to strip out? Do you mean don't type check for production builds?
Everything is transpired to JS before it hits prod.

But yeah it's slow

bingo. tsc for dev. sucrase for prod.