Aller au contenu principal

log-more > Result > error

Result.error() method​

A helper function to return back an error result

Signature:
static error<TReturned = any>(error?: any, type?: EventType): Result<TReturned>;

Parameters​

ParameterTypeDescription
erroranyThe error details to assign to the result object
typeEventTypeThe event type to assign to the result object
Returns:

Result<TReturned>

The result object specifying the error