Combinatorsfailurefailure Callablefailure<T>(f: T): FailureConverts the value to a Failure. The function as as an identity function on a failure. Examplefailure("foobar")// => Error("foobar")failure(new Error("foobar"))// => Error("foobar")Type parametersTThe value type.Parametersf: TThe value to create a Failure from.Returns FailureThe unpacked value.
Converts the value to a
Failure
. The function as as an identity function on a failure.Example