Type Parameters
- T extends NonUndefined
- E extends NonUndefined
Returns val is ErrResult<never, E>
true if the provided Result is an ErrResult, false otherwise.
Example
const result = Err('Failure');
if (isErr(result)) {
console.log('Operation failed with error:', result.unwrapErr());
}
Type guard to check if a Result is an Err value. This function is used to narrow down the type of a Result to ErrResult in TypeScript type system.