Function: err()
err<
T>(error):Err<T>
Defined in: index.ts:242
Creates an Err result containing the provided error.
Type Parameters
T
T
The type of the error
Parameters
error
T
The error data to wrap in an Err result
Returns
Err<T>
An Err result, or a Promise of an Err result if the input is a Promise
Example
typescript
const r1 = err("some error"); // Err<"some error">