typescript-exhaustive-switch
CommunityCatch missing TypeScript switch cases at compile time
Software Engineering#typescript#refactoring#discriminated unions#code safety#never type#exhaustive switch
Authorpaulbrittain
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill prevents silent logic gaps in TypeScript by forcing switch statements over discriminated unions or enums to handle every possible variant, so newly added variants fail fast at compile time instead of causing runtime bugs.
Core Features & Use Cases
- Exhaustive default
nevercheck: Uses the default branch to create a compile-time error when an unhandled variant appears. - Works for discriminated unions and enums: Ensures safety when switching over
kind-style tagged unions, string literal unions, or enums. - Clear failure signal: Produces a type-checking failure that points developers directly to the missing case.
Quick Start
When you are editing a TypeScript switch over a discriminated union, apply an exhaustive default branch using a never-typed variable so TypeScript reports a compile error if any variant is missing.
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: typescript-exhaustive-switch Download link: https://github.com/paulbrittain/claude-team-kit/archive/main.zip#typescript-exhaustive-switch 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.