exhaustiveness-checking

Installation
SKILL.md

Use Never Types for Exhaustiveness Checking

Overview

Use never to ensure all cases in a union are handled.

When you add a new variant to a union type, TypeScript can automatically flag every switch statement that needs updating. This catches errors of omission at compile time.

When to Use This Skill

  • Handling all cases of a tagged union
  • Adding new variants to discriminated unions
  • Writing switch statements that must be complete
  • Want compile-time errors when cases are missed

The Iron Rule

Installs
18
GitHub Stars
2
First Seen
Feb 3, 2026
exhaustiveness-checking — marius-townhouse/effective-typescript-skills