Home > @wixc3/common > toError
Convert any kind of value to an error instance. Unless the value is already an error instance, it’s stringified and used as the error message.
Signature:
export declare function toError(value: unknown): Error;
Parameter | Type | Description |
---|---|---|
value | unknown |
Returns:
Error