Variables
Const left
left
: <A, B>
(value
: A) => Either<A, B> = Left.of as <A, B = unknown>(value: A) => Either<A, B>
Type declaration
-
- <A, B>(value: A): Either<A, B>
-
Type parameters
Parameters
Returns Either<A, B>
Const of
of
: <A, B>
(value
: B) => Either<A, B> = Right.of
Type declaration
-
- <A, B>(value: B): Either<A, B>
-
Type parameters
Parameters
Returns Either<A, B>
Either data structure. Extremely useful for handling errors or different logic paths without the use of if-statements.
Either