Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Err<E, A>

Type parameters

  • E

  • A

Hierarchy

Index

Constructors

constructor

  • new Err(error: E): Err

Properties

Private error

error: E

Methods

andThen

  • andThen<B>(fn: function): Result<E, B>

ap

assign

  • assign<K, B>(k: K, other: Result<E, B> | function): Result<E, A & object>

cata

do

  • do(fn: function): Result<E, A>
  • Parameters

    • fn: function
        • (a: A): void
        • Parameters

          • a: A

          Returns void

    Returns Result<E, A>

getOrElse

  • getOrElse(fn: function): A

getOrElseValue

  • getOrElseValue(defaultValue: A): A

map

  • map<B>(fn: function): Result<E, B>
  • Type parameters

    • B

    Parameters

    • fn: function
        • (_: A): B
        • Parameters

          • _: A

          Returns B

    Returns Result<E, B>

mapError

  • mapError<X>(fn: function): Result<X, A>
  • Type parameters

    • X

    Parameters

    • fn: function
        • (err: E): X
        • Parameters

          • err: E

          Returns X

    Returns Result<X, A>

orElse

  • orElse<X>(fn: function): Result<X, A>

Generated using TypeDoc