What problem does it solve?
TypeScript projects often suffer from weak typing and refactoring drift, leading to runtime errors and brittle code. This Skill promotes strict typing patterns to reduce these risks and improve long-term maintainability.
Core Features & Use Cases
- Const Types Pattern: use const objects and derived unions (as const) to provide a single source of runtime values and type-safe keys.
- Flat Interfaces: prefer separate interfaces and extends over inline nested types for clarity and reusability.
- Avoid Any: favor unknown and generics to keep code flexible yet type-safe.
- Utility Types & Type Guards: apply Pick, Omit, Partial, Required, and custom guards to model precise shapes.
- Import Types: use type-only imports to decouple types from runtime code and improve maintainability.
Quick Start
Refactor a sample module by turning an inline type into a named interface, introduce a const STATUS object, and replace any with unknown where appropriate.