UNPKG

error-to-json

Version:

Returns a JSON representation of an error (handles nested errors and calls nested toJSONs)

6 lines (5 loc) 153 B
export default errToJSON; declare function errToJSON<T extends {}>(err: Error): T; export declare function parse(json: { message: string; }): Error;