UNPKG

@visulima/error

Version:

Error with more than just a message, stacktrace parsing.

15 lines (14 loc) 474 B
interface DeserializeOptions { maxDepth?: number; } /** * Options for deserializing error objects. */ type DeserializeOptionsType = DeserializeOptions; /** * Deserialize a value back to its original form. * If the value looks like a serialized error, it will be reconstructed as an Error instance. * Otherwise, it will be wrapped in a NonError. */ declare const deserialize: (value: unknown, options?: DeserializeOptionsType) => Error; export default deserialize;