Skip to content

True Myth / result / isErr

Function: isErr()

isErr<T, E>(result): result is Err<T, E>

Is the Result an Err?

Type Parameters

T

T

The type of the item contained in the Result.

E

E

Parameters

result

Result<T, E>

The Result to check.

Returns

result is Err<T, E>

A type guarded Err.