Evercatch - v0.8.0
    Preparing search index...

    Function unsafeUnwrapAsync

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

      Type Parameters

      • T

        The type of the value.

      • E = Error

        The type of the error.

      Parameters

      Returns Promise<T>

      A promise that resolves to the unwrapped value.

      The error if the result contains an error.

      const result = someAsyncFunctionThatReturnsResult();
      const value = await unsafeUnwrapAsync(result);
      console.log(value);