Function assertIsErr

  • Type assertion function to ensure a result is Err. Throws an error if the result is Ok.

    Parameters

    • result: IResult<any, any>

      The result to check

    Returns asserts result is Err<any, any>

    If the result is Ok