Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For those who are actively using esbuild with TypeScript, how do you check the types?


In 3 ways:

- Using the Language Server Plugin in editors

- `npx tsc --noEmit` in a pre-commit hook

- `npx tsc --noEmit` in CI


I have a "lint" pre-test step that builds with tsc and runs eslint.

I also have a `tsc --watch` running in a vscode window that highlights syntax and typing errors as I develop.


What some people do is use types purely for editor purposes, and let the build process just throw them away. We did this at my last company using Babel


I run tsc with noEmit passed as a flag. Esbuild is replaces my previous tsc, babel, uglify setup and is much faster.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: