Evercatch - v0.3.1
    Preparing search index...

    Function unsafe

    • Extracts the successful value from a Result, throwing an error if it represents a failure.

      Type Parameters

      • T
      • E extends string

      Parameters

      Returns T

      The success value if present

      An Err if the Result contains an error

      const value = unsafe(someSafeFunction());
      // If someSafeFunction() returns an error, the error will be thrown