typescript

Optimize TypeScript compilation performance and resolve type errors via refactors and tsconfig configuration.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/moughamir/justwaitit-review --skill typescript-moughamir
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/moughamir/justwaitit-review/tree/main/.agents/skills/typescript
Command: npx skills add https://github.com/moughamir/justwaitit-review --skill typescript-moughamir

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

TypeScript performance problems and confusing type-checking errors slow development and waste build time, especially when types get complex or tsconfig is misconfigured.

Core Features & Use Cases

  • High-impact compiler and tsconfig tuning: guidance for incremental builds, declaration emit, library type checking, and include/exclude scanning to reduce compilation overhead.
  • Type-performance refactors: actionable rules to avoid expensive type computations like deep generic nesting, large unions, and complex mapped types.
  • Async and module optimization for TS codebases: concrete patterns to improve async/await structure and reduce bundling/runtime costs driven by import style and module graphs.
  • Memory and safety-oriented TS practices: techniques to prevent common memory pitfalls (listeners/timers/state leaks) and strengthen type safety (guards, unknown vs any, exhaustive unions).

Quick Start

Apply the TypeScript skill to your .ts/.tsx code and tsconfig.json by asking it to optimize compilation performance and resolve current TypeScript errors you are seeing.

Frequently Asked Questions about typescript

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

FAQPage Schema
How do I speed up TypeScript builds and reduce tsc compilation time?

Speed up TypeScript builds by tuning tsconfig for incremental compilation and optimizing library type checking. Adjusting include/exclude scanning and enabling declaration emit reduces compilation overhead for complex type computations.

Why does TypeScript compilation hang when processing complex mapped types and large unions?

TypeScript compilation hangs because deep generic nesting, large unions, and complex mapped types create expensive type computations. Refactoring these type structures using targeted rules reduces type-checking overhead and resolves compilation performance issues.

How to fix common TypeScript type-assignment errors and resolve confusing type checks?

Fix TypeScript type-assignment errors by applying targeted refactors that strengthen type safety. Using type guards, replacing 'any' with 'unknown', and ensuring exhaustive unions resolves confusing type-checking failures during compilation.

What is the best way to optimize async/await patterns and module imports in TypeScript?

Optimize async/await patterns and module imports in TypeScript by applying concrete structural rules. Improving async pattern structure and adjusting import styles reduces bundling costs and runtime overhead driven by module graphs.

How do I prevent memory leaks in TypeScript applications caused by listeners and timers?

Prevent memory leaks in TypeScript applications by applying memory-oriented safety practices. Targeted refactors help avoid common memory pitfalls caused by unmanaged event listeners, timers, and retained state in long-running processes.

Can I use targeted tsconfig configuration to fix TypeScript compiler performance issues?

You can use targeted tsconfig configuration to fix TypeScript compiler performance issues. High-impact tuning rules for incremental builds, declaration emit, and library type checking reduce misconfigured compilation overhead.