Class GetValueError

Runtime error thrown when attempting to get/unwrap the wrong side of an Either jonad.

const maybeNumber = Option.from(null);
maybeNumber.getLeftOrThrow();
// => GetValueErorr: Attempted to get the left value, but it was missing

Hierarchy (view full)

Constructors

Properties

message: string
name: string
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void