TypeScript - Performance & Compiler Speed
Compiler performance
- Enable
incremental
and usetsc -b
in monorepos. - Use
skipLibCheck
to avoid checking third-party types. - Avoid huge union types in hot paths; prefer lookup maps.
Transpile vs typecheck
- For dev servers, use SWC/ESBuild +
tsc --noEmit
in parallel.
Editor performance
- Limit number of open workspaces, exclude large generated folders, and keep
node_modules
out ofinclude
.