Function unwrapErr

Retrieve the underlying error from an Err result.

The error type of the Err result.

Result to unwrap the error from

The underlying error of the Err result

  • Retrieve the value from an Err result.

    This override documents that an error is thrown when unwrapping an Err result.

    Parameters

    • result: Result<unknown, never>

      An Err result value

    Returns never

    Never

  • Retrieve the error from an Ok result.

    This override is required for type safety for Ok results.

    Type Parameters

    • E = unknown

      The error type of the Err result.

    Parameters

    • result: Result<unknown, E>

      Result to unwrap the value from

    Returns E

    The error value of E result