Home > @wixc3/common > isErrorLikeObject
Checks if the error
is an object compatible with the Error interface; that is, it has properties ‘name’ and ‘message’ of type string. The object could be an instance of an Error, or it could be some other kind of object that has these properties.
Signature:
export declare function isErrorLikeObject(error: unknown): error is Error;
Parameter | Type | Description |
---|---|---|
error | unknown |
Returns:
error is Error