typescript-performance-best-practices

Configure TypeScript incremental builds and project references to reduce build times.

2|1|Updated Jan 17, 2026
One-click install
npx skills add https://github.com/mcart13/dev-skills --skill typescript-performance-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-performance-best-practices
Source: https://github.com/mcart13/dev-skills/tree/main/skills/typescript-performance-best-practices
Command: npx skills add https://github.com/mcart13/dev-skills --skill typescript-performance-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill consolidates TypeScript performance best practices to help teams reduce build times, speed up type-checking, and improve editor responsiveness across large codebases.

Core Features & Use Cases

  • Incremental builds & project references: guidance to enable incremental mode and proper project references to minimize re-checks.
  • Module resolution & lib checks: tips on modern moduleResolution and bundler-friendly setups to cut resolution time.
  • Diagnostics-driven optimization: workflows using extendedDiagnostics, explainFiles, and traceResolution to locate bottlenecks in CI or editors.

Quick Start

Configure incremental builds, adopt project references, and enable isolatedDeclarations to accelerate type-checks, builds, and editor responsiveness.

Frequently Asked Questions about typescript-performance-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I speed up TypeScript builds and type-checking in a large monorepo?

Speed up TypeScript builds by enabling incremental mode, configuring project references, and adopting isolatedDeclarations to minimize re-checks across large codebases. This structured approach targets monorepo environments to reduce build times and improve developer productivity.

What is the best way to optimize TypeScript editor responsiveness and reduce tsserver latency?

Optimize TypeScript editor responsiveness by using modern moduleResolution and bundler-friendly setups to cut resolution time. Additionally, leveraging project references ensures the tsserver only loads necessary files, significantly reducing type-checking latency.

How does incremental TypeScript compilation work with project references?

Incremental TypeScript compilation works with project references by enabling incremental: true in tsconfig, allowing the compiler to emit .tsbuildinfo files. This tracks graph changes and skips re-checking unaffected projects, minimizing re-checks during continuous development.

Can I use extendedDiagnostics and traceResolution to find TypeScript performance bottlenecks?

Yes, you can use extendedDiagnostics, explainFiles, and traceResolution workflows to locate TypeScript performance bottlenecks in CI pipelines or editors. These diagnostic tools expose detailed resolution times and file processing overhead to pinpoint slow compilation areas.

Does enabling isolatedDeclarations accelerate TypeScript declaration emission?

Yes, enabling isolatedDeclarations accelerates TypeScript declaration emission by ensuring each file can be independently type-checked. This reduces the computational overhead required for generating .d.ts files, directly improving build speed and type-checking performance.

What are the limitations of using incremental TypeScript builds in CI pipelines?

Incremental TypeScript builds in CI pipelines require persistent cache storage for .tsbuildinfo files between runs to be effective. Without proper caching mechanisms, the compiler cannot skip unchanged projects, negating performance benefits and potentially increasing overall CI times.