Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Ok<E, A>

Type parameters

  • E

  • A

Hierarchy

Index

Constructors

constructor

  • new Ok(value: A): Ok
  • Parameters

    • value: A

    Returns Ok

Properties

Private value

value: A

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(_: A): A

map

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

    • B

    Parameters

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

          • a: A

          Returns B

    Returns Result<E, B>

mapError

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

    • X

    Parameters

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

          • e: E

          Returns X

    Returns Result<X, A>

orElse

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

Generated using TypeDoc