Function: err()
err<
E>(error):Err<E>
Defined in: result/constructors/index.ts:31
Creates a failed Result containing an error.
Type Parameters
E
E
Parameters
error
E
The error value
Returns
Err<E>
An Err Result containing the error
Example
const result = err('Something went wrong')
// => { _tag: 'Err', error: 'Something went wrong' }