A utility class which is used to assert the success of an operation
which returns a union type of SuccessType | ErrorResponse [ | ErrorResponse ].
The methods of this class are used to:
Example
(input: T | any) => input is TA type guard which returns true if the input passes the testFn predicate.
(input: T | R) => asserts input is TAsserts (using the testing library's fail() function) that the input is
successful, i.e. it passes the testFn.
(input: T | R) => asserts input is RAsserts (using the testing library's fail() function) that the input is
not successful, i.e. it does not pass the testFn.