About compiler-performance
A TypeScript skill for developers maintaining large projects or addressing slow builds and IDE responsiveness. It recommends monitoring compiler performance, using project references and incremental settings, and avoiding expensive type patterns.
Key features
- 01Monitor compiler performance
- 02Use TypeScript project references
- 03Configure incremental compilation
- 04Avoid expensive type patterns
Use cases
- 01Investigating slow TypeScript builds
- 02Splitting large projects into references
- 03Improving IDE responsiveness
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ marius-townhouse/ effective-typescript-skills --skill compiler-performanceAfter installing, type/compiler-performancein Claude Code to confirm it loaded.
Details
From the project READMEPay Attention to Compiler Performance
Overview
TypeScript compilation can become slow in large projects. Monitor and optimize compiler performance using techniques like project references, proper tsconfig settings, and avoiding expensive type patterns. Fast compilation improves developer experience.
When to Use This Skill
- Build times are slow
- Optimizing TypeScript projects
- Configuring project references
- Working with large codebases
- Improving IDE responsiveness
The Iron Rule
Monitor and optimize TypeScript performance. Use project references, avoid expensive type patterns, and keep compilation fast.
Performance Tips
// AVOID: Expensive recursive types
type DeepPartial<T> = T extends object
? { [K in keyof T]?: DeepPartial<T[K]> }
: T;
// PREFER: Iterative approaches, project references
// Split large projects using project references
// tsconfig.json optimizations
{
"compilerOptions": {
"incremental": true, // Incremental compilation
"tsBuildInfoFile": ".tsbuildinfo"
}
}
Reference
- Effective TypeScript, 2nd Edition by Dan Vanderkam
- Item 78: Pay Attention to Compiler Performance
Comments
Markdown supported