Class: Ok

Ok()

Ok Result.

Constructor

new Ok()

Source:

Methods

isErr() → {boolean}

Is Result an Error?
Source:
Returns:
True if error, false if ok.
Type
boolean

isOk() → {boolean}

Is Result Ok?
Source:
Returns:
True if ok, false if error.
Type
boolean

unwrap() → {T}

Unwrap the result, throwing if in error state.
Source:
Returns:
The unwrapped result.
Type
T

unwrapOr() → {T}

Unwrap the result or return alternate value if in error state.
Source:
Returns:
The unwrapped result or alternate value.
Type
T