Result.error() method​
A helper function to return back an error result
Signature:static error<TReturned = any>(error?: any, type?: EventType): Result<TReturned>;
Parameters​
Parameter | Type | Description |
---|---|---|
error | any | The error details to assign to the result object |
type | EventType | The event type to assign to the result object |
Result<TReturned>
The result object specifying the error