@storm-stack/errors
Version:
This package includes a base error class and various utility functions for working with errors.
17 lines (16 loc) • 525 B
TypeScript
import type { JsonValue } from "@storm-stack/serialization";
import { StormError } from "../storm-error";
/**
* Serializes a StormError into a JSON object
*
* @param error - The error to serialize
* @returns The serialized error
*/
export declare function serializeStormError(error: StormError): JsonValue;
/**
* Deserializes a JSON object into a StormError
*
* @param error - The error to deserialize
* @returns The deserialized error
*/
export declare function deserializeStormError(json: JsonValue): StormError;