What problem does it solve?
Large or evolving TypeScript codebases often accumulate unsafe types, pervasive use of any, and fragile assertions that hide bugs and reduce developer confidence. This Skill helps developers implement and enforce precise types, replace unsafe assertions with safe narrowing or branded types, and align runtime guards with compile-time guarantees.
Core Features & Use Cases
- Type-first refactors: Replace any and unsafe as with generics, unknown-and-narrowing, discriminated unions, or branded types for safer public APIs.
- Configuration hygiene: Incrementally tighten tsconfig and typescript-eslint settings when it materially improves safety and remains reviewable.
- Verification & tests: Run the repository's typecheck, add type-level tests for exported utilities, and re-run lint/tests as part of verification.
- Use Case: Convert a repo using permissive types into an ESM-first, strictly-typed codebase that passes tsgo --noEmit or tsc --noEmit without weakening existing APIs.
Quick Start
Audit the repository for any and unsafe as usages, design explicit types for affected APIs, update tsconfig and ESLint incrementally where safe, and run the project's typecheck until it passes.