Branded Types: Stop Passing the Wrong String to the Right Function
📰 Dev.to · Gabriel Anhaia
A UserId and an OrderId are both strings, so the compiler lets you swap them. Branded types close that hole for zero runtime cost.
A UserId and an OrderId are both strings, so the compiler lets you swap them. Branded types close that hole for zero runtime cost.