3 ms·
> TS "compilers" basically strip out the type annotations, they don't care about the validity of the types, so you'll be missing out on the main reason to be us
by timmg 4y ago
> TS "compilers" basically strip out the type annotations, they don't care about the validity of the types, so you'll be missing out on the main reason to be using TypeScript.
I guess I'd want a Typescript compiler that does the "type checking" before stripping out the type annotations. Like that's how TS is supposed to work.
If ESBuild doesn't do the type checking, then it probably doesn't fit my need.
Edit: In fairness, if my IDE does the type-checking, this is almost good enough.
- lukevp 4y agoYou can run esbuild during development for quick builds and eslint for ide typescript enforcement, and then use tsc plus eslint during a production build to enforce type checking.
- diroussel 4y agoOne option is to do type checking with tsc (or in your unit tests). And build into a single file with tsup. https://tsup.egoist.dev/ https://tsup.egoist.dev/