Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SuccessAndFailureResult<T, E>

Class representing a result that can both have successful and failed values. This is only used internally by and returned from allSettled

Type parameters

  • T

  • E = Error

Hierarchy

  • SuccessAndFailureResult

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Private _err

_err: E

Private _res

_res: T

Accessors

error

  • get error(): E

failure

  • get failure(): boolean
  • Returns true if an error result, false otherwise

    Returns boolean

result

  • get result(): T

success

  • get success(): boolean
  • Returns true if a success result, false otherwise`

    Returns boolean

Methods

unwrap

  • unwrap(): [T, E]
  • Returns a tuple with [successValue, failureValue]

    Returns [T, E]

Generated using TypeDoc