isErr

Result.isErr returns whether or not the result is Err

Result<T, E>.isErr(): boolean;

Example


div(2, 2).isErr(); // => false

div(2, 0).isErr(); // => true