Take control of unexpected data at runtime with TypeScript
The article shows how TypeScript type definitions can be paired with runtime validators to catch bad config and API data, then contrasts exception-based handling with Result and Either workflows.