© 2026 Hedgehog Software, LLC
type UserId = string & B.Brand<"UserId">; const UserId = B.nominal<UserId>(); // UserId (yey!) const userId = UserId("asd")
const UserId = pipe(S.string, S.brand("UserId")); type UserId = S.To<typeof UserId>; // string & B.Brand<typeof UserId> (ewww) const myUserId = UserId("asd")
const UserIdSchema = pipe(S.string, S.fromBrand(UserId)); // string & B.Brand<typeof UserId> (ewww) const userId = S.parse(UserIdSchema)("asdasd")