What problem does it solve?
It helps you prevent incorrect behavior that happens when developers assume compile-time types prove runtime correctness, instead of validating values at I/O boundaries.
Core Features & Use Cases
- Soundness vs unsoundness: Understand what guarantees TypeScript (and gradual type systems) actually provide, and where they leak (escape hatches, assertions,
any, and unchecked assumptions).
- Safer refinement patterns: Use narrowing (including discriminated unions) to avoid casts and preserve correctness.
- Exhaustiveness verification: Enforce complete handling of unions so missing cases fail at compile time.
- Runtime boundary discipline: Validate external data (parsed JSON, env vars, storage, network responses) with runtime validators before trusting internal types.
Quick Start
Use the type-safety skill to review a TypeScript change and identify where external inputs are being treated as typed without boundary validation, then propose narrowing and exhaustiveness improvements.