Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Either<A, B>

Either data structure. Extremely useful for handling errors or different logic paths without the use of if-statements.

name

Either

Type parameters

  • A

  • B

Index

Variables

Variables

Const left

left: <A, B>(value: A) => Either<A, B> = Left.of as <A, B = unknown>(value: A) => Either<A, B>

Creates an Either<A, B> that is of type Left

name

Either.left(value: A): Either<A, B>

Type declaration

Const of

of: <A, B>(value: B) => Either<A, B> = Right.of

Creates an Either<A, B> that is of type Right

name

Either.of(value: A): Either<B, A>

Type declaration

Generated using TypeDoc