Understanding Branded Types: A Simple Guide

I really like this explanation of branded (opaque types) from here:
https://prosopo.io/articles/typescript-branding/

The effect docs (https://effect.website/docs/guides/style/branded-types) are to complex to understand this simple but important concept. Maybe it can be updated.
Prosopo
How to brand TypeScript types for norminal typing
Explore the concept of branded types in TypeScript using the Brand module. Understand the "data-last" and "data-first" variants, and learn to create branded types with runtime validation (refined) and without checks (nominal). Discover how to use and combine branded types to enforce type safety in your code.
Branded Types – Effect Docs
Was this page helpful?