typescript

Optimize TypeScript compiler options and refactor patterns to reduce build time and type errors.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/remiconnesson/insights-garden --skill typescript-remiconnesson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/remiconnesson/insights-garden/tree/main/.agents/skills/typescript
Command: npx skills add https://github.com/remiconnesson/insights-garden --skill typescript-remiconnesson

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps teams reduce TypeScript compile time, eliminate common type errors, and tighten code quality in projects that rely on .ts, .tsx, and .d.ts files.

Core Features & Use Cases

  • Compiler Performance Tuning: Improve build speed with tsconfig guidance such as incremental compilation, isolated modules, skipLibCheck, and targeted file includes.
  • Type-System Optimization: Refactor complex generics, unions, intersections, and conditional types to make inference faster and declarations cleaner.
  • Async and Module Best Practices: Fix slow or fragile async patterns, remove unnecessary wrappers, use Promise.all for parallel work, and organize imports to avoid barrel-file and runtime overhead.
  • Safety and Reliability: Strengthen null handling, index access, type guards, exhaustive checks, and other patterns that prevent runtime bugs before they ship.

Quick Start

Analyze the TypeScript project and recommend the highest-impact compiler, typing, async, and module changes needed to improve build performance and fix type errors.

Frequently Asked Questions about typescript

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

FAQPage Schema
How do I fix slow TypeScript compile times and reduce build memory usage?

Fix slow TypeScript compile times by tuning tsconfig with incremental compilation, isolated modules, skipLibCheck, and targeted file includes to reduce build memory usage. Apply these compiler performance optimizations alongside module organization refactoring to eliminate barrel-file overhead.

What is the best way to refactor complex TypeScript generics for faster type inference?

The best way to refactor TypeScript generics for faster type inference is to simplify complex unions, intersections, and conditional types. This type-system optimization makes declarations cleaner and inference faster, directly reducing compile-time slowdowns.

How do I resolve common TypeScript compiler errors related to null handling and index access?

Resolve common TypeScript compiler errors by strengthening null handling and index access with type guards and exhaustive checks. These safety and reliability patterns prevent runtime bugs and ensure safer compiler options are enforced across .ts and .tsx files.

Does this approach work with .d.ts maintenance and library code, or only application code?

Yes, this approach works with .d.ts maintenance and library code alongside application code. It applies refactoring patterns and explicit return types across .ts, .tsx, and .d.ts files to tighten code quality and improve compiler performance in any TypeScript project.

How do I fix fragile async patterns in TypeScript to avoid runtime bugs?

Fix fragile TypeScript async patterns by removing unnecessary wrappers and using Promise.all for parallel work. This async and module best practice reduces runtime overhead and prevents bugs before they ship, pairing with import organization to eliminate barrel-file issues.