Lexicon

Narrow Type

Kind: technique

Layer: Contracts Core

Record: lexicon:narrow-type

Canonical: Lexicon

A technique for replacing a broad type with one that admits only the values the domain allows.

Listed in Lexicon terms, after Introduce Discriminated Union and before Define Absence Semantics.

Category

  • Schema / Canonical Data / Semantics

Refactors

  • Primitive Obsession
  • Registry Pattern
  • Type Safety

Linked from

  • Anti-patterns
  • Plugin / Extensibility / IoC
  • Schema / Canonical Data / Semantics