structural-typing

Installation
SKILL.md

Get Comfortable with Structural Typing

Overview

TypeScript uses structural typing: if it has the right shape, it fits.

Unlike nominal typing (where types must be explicitly declared), TypeScript checks structure. Understanding this prevents surprises and unlocks powerful patterns.

When to Use This Skill

  • Surprised that TypeScript accepts "wrong" values
  • Designing interfaces and function parameters
  • Writing unit tests with mock objects
  • Debugging "impossible" type errors
  • Understanding why extra properties are allowed

The Iron Rule

Installs
15
GitHub Stars
2
First Seen
Feb 3, 2026
structural-typing — marius-townhouse/effective-typescript-skills