@jiminp/tooltool
    Preparing search index...

    Function resultUnwrap

    • Extracts the value from a successful result, or throws the error.

      Type Parameters

      • T
      • E = Error

      Parameters

      • result: Result<T, E>

        The result to unwrap.

      Returns T

      The success value.

      The error if the result is Err.

      resultUnwrap({ ok: true, value: 42 });  // 42
      resultUnwrap({ ok: false, error: e }); // throws e