type OrderID = string & { readonly brand: unique symbol }; type UserID = string & { readonly brand: unique symbol }; type ID = OrderID | UserID; We can create these values with the Companion Object Pattern: function OrderID(id: string) { return id as OrderID; } function UserID...