revealui-typescript-quality

Replace unsafe 'any' types with unknown, generics, and type guards in TypeScript codebases.

4|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/RevealUIStudio/revealui --skill revealui-typescript-quality
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: revealui-typescript-quality
Source: https://github.com/RevealUIStudio/revealui/tree/main/.revealui/skills/revealui-typescript-quality
Command: npx skills add https://github.com/RevealUIStudio/revealui --skill revealui-typescript-quality

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

RevealUI's codebase currently contains numerous occurrences of the any type, leading to unsafe runtime behavior and brittle type safety. This Skill provides a standardized approach to eliminating those any types and improving overall TypeScript quality.

Core Features & Use Cases

  • Enforces strict typing: Replaces any with unknown, generics, and robust type guards to regain compile-time safety.
  • Guided refactoring: Provides step-by-step guidance for converting specific modules and APIs to precise types.
  • Runtime validation integration: Encourages validation with Zod or type guards to guard against untrusted data and API responses.

Quick Start

Scan your codebase for any usages of the any type and start replacing them with well-typed structures.

Frequently Asked Questions about revealui-typescript-quality

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

FAQPage Schema
How do I eliminate unsafe 'any' types in a TypeScript codebase?

To eliminate unsafe 'any' types in TypeScript, replace them with 'unknown', generics, and robust type guards to enforce strict compile-time type safety and prevent brittle runtime behavior.

What is the best way to refactor TypeScript APIs to enforce strict type-safety?

The best way to refactor TypeScript APIs for strict type-safety is to apply guided, step-by-step conversions replacing 'any' with precise type structures and runtime validation patterns like Zod.

Does runtime validation work with TypeScript static analysis to guard API responses?

Runtime validation works with TypeScript static analysis by integrating type guards or validation libraries to guard against untrusted data and API responses, ensuring unknown types are safely narrowed.

Can I use this approach for both frontend and backend TypeScript projects?

Yes, you can apply these strict typing and type-safety guidelines across both frontend and backend TypeScript projects to guide code reviews, refactoring, and CI checks.

Why should I use 'unknown' instead of 'any' for untrusted data in TypeScript?

You should use 'unknown' instead of 'any' for untrusted data in TypeScript because 'unknown' forces explicit type checking and narrowing, whereas 'any' disables type checking and compromises type safety.