Evercatch - v0.8.0
    Preparing search index...

    Function unsafeUnwrap

    • Unwraps a Result, throwing the error if it exists.

      Type Parameters

      • T

        The type of the value.

      • E = Error

        The type of the error.

      Parameters

      • result: Result<T, E>

        The Result to unwrap.

      Returns T

      The unwrapped value.

      The error if the result contains an error.

      const result = someFunctionThatReturnsResult();
      const value = unsafeUnwrap(result);
      console.log(value);