ts-type-debug

Inspects TypeScript symbol types using ts-morph and a provided tsconfig file.

4|1|Updated Dec 11, 2025
One-click install
npx skills add https://github.com/yoyooyooo/logix --skill ts-type-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ts-type-debug
Source: https://github.com/yoyooyooo/logix/tree/main/.agent/skills/ts-type-debug
Command: npx skills add https://github.com/yoyooyooo/logix --skill ts-type-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ts-morph, tsx, typescript, and includes scripts (resource) components.

What problem does it solve?

This skill helps you stop guessing TypeScript’s inferred types by letting you inspect the fully-resolved type of a symbol directly from your codebase.

Core Features & Use Cases

  • Type inspection via ts-morph: resolves the concrete type for variables, functions, and type aliases in a specified file.
  • Effect-centric debugging: quickly validates whether complex generic channels like Effect.Effect<A, E, R> match your expectations.
  • Practical workflow for refactors: use it when signatures change (e.g., Store/Logic/Service contracts) and you need fast confirmation of inference results.

Quick Start

Run npx tsx scripts/inspect-types.ts <filePath> <symbolName> --tsconfig <path/to/tsconfig.json> from the skill root to print the fully-resolved type for the symbol.

Frequently Asked Questions about ts-type-debug

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

FAQPage Schema
How do I inspect the fully-resolved TypeScript type of a specific variable in a .ts file?

To inspect a fully-resolved TypeScript type, use ts-morph to load the project via a provided tsconfig and print the symbol's computed getText() type. This resolves concrete types for variables, functions, and type aliases in a specified file.

Can I debug Effect generic inference channels like A, E, and R using ts-morph?

Yes, you can debug Effect generic inference channels like A, E, and R using ts-morph. It quickly validates whether complex generic channels within Effect.Effect match your expectations during refactors by resolving the concrete type.

What is the best way to see inferred TypeScript types without guessing during refactors?

The best way to see inferred TypeScript types without guessing is to run a local type inspection script. It uses ts-morph to locate a variable or function by name and prints the computed type, ensuring signatures match expectations.

Do I need a specific tsconfig.json path to resolve TypeScript types locally?

Yes, you need to provide a specific tsconfig.json path to resolve TypeScript types locally. The tool loads your project context using ts-morph and requires this configuration to correctly locate symbols and compute their fully-resolved types.

How do I print the computed type of a function signature using a TypeScript script?

To print the computed type of a function signature, run the inspection script using tsx with the file path and symbol name arguments. It locates the function within the ts-morph project and outputs the fully-resolved type text.