exhaustiveness-checking
CommunityEnsure switch statements cover all union cases.
Software Engineering#typescript#type-safety#compile-time#union-types#exhaustiveness#switch-statements
Authorluyi985
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill prevents runtime omissions by enforcing exhaustiveness when dealing with tagged unions in TypeScript, ensuring every union variant is explicitly handled.
Core Features & Use Cases
- Compile-time protection against missing cases in discriminated unions.
- Guidance on adding new variants and updating switch logic consistently.
- Patterns like assertUnreachable to surface missing cases during development.
Quick Start
Add an assertUnreachable default in your switch statements that handle union types to force a compile-time error when a new variant is added.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: exhaustiveness-checking Download link: https://github.com/luyi985/lyi-bash/archive/main.zip#exhaustiveness-checking Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.