Cast a value to its branded type. Pure type-level sugar — no runtime validation. For validated construction, wrap it in a parser that returns Result<Brand<T, K>, E>.
Result<Brand<T, K>, E>
type UserId = Brand<string, "UserId"> const toUserId = (s: string): UserId => make<string, "UserId">(s) const id = toUserId("u_42") Copy
type UserId = Brand<string, "UserId"> const toUserId = (s: string): UserId => make<string, "UserId">(s) const id = toUserId("u_42")
Cast a value to its branded type. Pure type-level sugar — no runtime validation. For validated construction, wrap it in a parser that returns
Result<Brand<T, K>, E>.