isLeft
isLeft<
L>(x):x is Left<L>
Check whether given x is of type Left.
Example
isLeft({left: 123})// => true
isLeft({right: 456})// => false
isLeft({left: 1234} as Either<number, string>)// => x is Left<number>Type Parameters
• L
The Left type.
Parameters
x
unknown
The value to check.
Returns
x is Left<L>
true if x is a Left, false otherwise.