typescript-expert

Diagnose and resolve TypeScript type errors, performance issues, and migration challenges.

1|Updated Aug 17, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/mdconverter --skill typescript-expert-ratnesh-maurya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-expert
Source: https://github.com/ratnesh-maurya/mdconverter/tree/main/.claude/skills/typescript-expert
Command: npx skills add https://github.com/ratnesh-maurya/mdconverter --skill typescript-expert-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? TypeScript projects often hit cryptic compiler errors, slow type checking, module resolution failures, and painful JavaScript-to-TypeScript migrations. This Skill provides expert-level guidance and diagnostics to identify root causes and apply proven fixes. ## Core Features & Use Cases - Project Diagnostics: Run the included diagnostic script to analyze tsconfig settings, detect tooling (Biome, ESLint, Vitest, Turborepo, Nx), count any usages, and measure type-check performance. - Advanced Type Patterns: Apply branded types, conditional types, template literal types, and discriminated unions using the bundled cheatsheet and utility-types library. - Migration & Monorepo Guidance: Get step-by-step strategies for JS-to-TS migration, ESLint-to-Biome moves, and Turborepo vs Nx decisions with project references configuration. - Use Case: Your build fails with "Type instantiation is excessively deep". Invoke this Skill to diagnose the recursive type, apply a depth-limited pattern, and validate with tsc --noEmit. ## Quick Start Use the typescript-expert skill to diagnose why my project has slow type checking and fix the excessive type instantiation errors.

Frequently Asked Questions about typescript-expert

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

FAQPage Schema
How do I fix slow TypeScript type checking?

Enable skipLibCheck and incremental compilation in tsconfig, then run tsc --extendedDiagnostics to identify bottlenecks. For monorepos, configure project references with composite: true, and split large union types or replace intersections with interfaces.

How to fix 'Type instantiation is excessively deep' error?

This error comes from deeply recursive or circular generic types. Limit recursion depth with conditional types, replace type intersections with interface extends, and break circular constraints using type aliases.

Biome vs ESLint: which should I use for TypeScript?

Choose Biome when speed is critical and you want one tool for linting and formatting with TypeScript-first support. Stay with ESLint when you need type-aware linting, custom plugins, or Vue/Angular support that Biome lacks.

Why does TypeScript say 'Cannot find module' when the file exists?

Module resolution failures usually mean moduleResolution doesn't match your bundler, or baseUrl and paths are misaligned. Run tsc --traceResolution to debug, and remember TypeScript paths don't resolve at runtime without tools like tsconfig-paths.

How do I migrate a JavaScript project to TypeScript incrementally?

Enable allowJs and checkJs in tsconfig, then rename files from .js to .ts gradually while adding types file by file. Enable strict mode flags one at a time, and use tools like ts-migrate or typesync to automate parts of the process.

What are branded types in TypeScript and when should I use them?

Branded types create nominal types by intersecting a primitive with a unique brand tag, preventing accidental mixing of values like UserId and OrderId. Use them for critical domain primitives, API boundaries, and units or currency values.