type-coverage

Measure type coverage and flag unsafe 'any' usage across codebases.

Updated Jul 17, 2017
One-click install
npx skills add https://github.com/luyi985/lyi-bash --skill type-coverage-luyi985
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: type-coverage
Source: https://github.com/luyi985/lyi-bash/tree/main/ai/skills/type-coverage
Command: npx skills add https://github.com/luyi985/lyi-bash --skill type-coverage-luyi985

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Measuring type coverage helps teams quantify how much of their codebase has real types versus any, enabling targeted improvements and reducing type-safety regressions.

Core Features & Use Cases

  • Measure type coverage across files and modules to identify untyped symbols.
  • Highlight explicit and implicit any sources (including library-originated any) so you can prioritize fixes.
  • Track changes over time and enforce CI thresholds to curb regressions during migrations from JavaScript to TypeScript.

Quick Start

Run the type-coverage analysis in your project to generate a report and highlight critical gaps.

Frequently Asked Questions about type-coverage

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

FAQPage Schema
How do I measure type coverage during a JavaScript to TypeScript migration?

Measure type coverage to quantify typed code versus 'any' usage across your codebase. This process generates a report identifying untyped symbols, enabling targeted improvements and reducing type safety regressions during ongoing quality assurance and code reviews.

How can I track and prevent type safety regressions in CI?

Track type safety regressions in CI by enforcing coverage thresholds that flag explicit, implicit, and library-originating 'any' types. This identifies actionable signals to curb regressions and maintain code quality during ongoing development.

What is the difference between explicit and implicit any in static analysis?

Explicit any is deliberately assigned, while implicit any occurs when types cannot be inferred. Static analysis highlights both alongside library-originating any as actionable signals, allowing you to prioritize and fix untyped symbols across files and modules.

Can I identify library-originated any types in my TypeScript codebase?

Yes, you can identify library-originated any types in your TypeScript codebase. The analysis highlights these external sources alongside explicit and implicit any, providing actionable signals to prioritize fixes for untyped symbols across modules.

What is the best way to reduce unsafe any usage in TypeScript?

Reduce unsafe any usage by measuring type coverage across files and modules to identify untyped symbols. Highlighting explicit, implicit, and library-originating any sources allows you to prioritize fixes and enforce CI thresholds to prevent regressions.