GuardsisFailureisFailure CallableisFailure(x: unknown): x is ErrorChecks if x is a Failure. ExampleisFailure("foobar")// => falseisFailure(new Error())// => trueParametersx: unknownThe value to check.Returns x is Errortrue if x is a Failure, false otherwise.
Checks if
x
is a Failure.Example