Used to check if a result is an Err.
Err
const result: Result<number, string> = err("error");const isErrResult: boolean = isErr(result); // true Copy
const result: Result<number, string> = err("error");const isErrResult: boolean = isErr(result); // true
if (isErr(result)) { // We now know that the result is an Err // so we can safely use it const error: string = unwrapErr(result); // "error"} Copy
if (isErr(result)) { // We now know that the result is an Err // so we can safely use it const error: string = unwrapErr(result); // "error"}
Used to check if a result is an
Err.