Design Patterns in TypeScript · Part 2 — Factory & Abstract Factory
Centralize object creation: factory functions over `new`, discriminated-union driven factories, the Abstract Factory for families of related objects, and where this beats classes in TypeScript.