2.0.0
Constructs a branded type from a value of type A, throwing an error if the provided A is not valid.
A
Constructs a branded type from a value of type A, returning Right<A> if the provided A is valid, Left<BrandError> otherwise.
Right<A>
Left<BrandError>
Attempts to refine the provided value of type A, returning true if the provided A is valid, false otherwise.
true
false
Constructs a branded type from a value of type A, returning Some<A> if the provided A is valid, None otherwise.
Some<A>
None
Readonly
Since
2.0.0