egghead.io
Improve Runtime Type Safety with Branded Types in TypeScript
The idea is to create a more specific and unique data type with greater clarity and specificity, this is accomplished by adding attributes or labels to an existing type to create a new, more specific type. Brands can be added to a type using a union of the base type and an object literal with a branded property.