Brand provides nominal types that prevent accidental usage of values in the wrong context.
Overview
Branded types add a type tag to prevent mixing values of the same underlying type that have different meanings.nominal
Create a brand constructor without runtime validation.refined
Create a brand constructor with runtime validation.With either
Use.either() for validation without throwing.