Function: fail()
Creates a Failure result from a given error.
Automatically wraps the error in a Promise if it is asynchronous.
Type Param
The type of the error to wrap.
Examples
See
collect - For collect multiple Results into a single Result.
Call Signature
fail():
Result<never,void>
Returns
Result<never, void>
Call Signature
fail<
E>(error):ResultFor<E,never,Awaited<E>>
Type Parameters
E
E
Parameters
error
E
Returns
ResultFor<E, never, Awaited<E>>
