Prevent accidental mixing of structurally identical types
type UserId = string & { readonly __brand: 'UserId' };
type OrderId = string & { readonly __brand: 'OrderId' };
function getUser(id: UserId) { /* ... */ }
const userId = 'abc' as UserId;
const orderId = 'abc' as OrderId;
getUser(userId); // Pass
getUser(orderId); // Type errortodo what is __brand specifically.