import type { JsonObject } from 'type-fest'; declare const VALID_SEVERITIES: readonly ["fatal", "error", "warning", "info", "debug"]; type SerializedSeverity = (typeof VALID_SEVERITIES)[number]; /** * assert that a value has the minimum serialized Xception shape * @param value the candidate serialized payload */ export declare function assertSerializedError(value: unknown): asserts value is JsonObject & { message: string; }; /** * determine whether a value can be treated as a JSON object * @param value the value to inspect * @returns whether the value is a non-null object and not an array */ export declare function isJsonObject(value: unknown): value is JsonObject; /** * extract an optional string field from serialized input * @param value the field value to normalize * @returns the string value when present */ export declare function readOptionalString(value: unknown): string | undefined; /** * normalize the serialized metadata payload * @param value the serialized meta field * @returns a plain object or an empty object fallback */ export declare function readMeta(value: unknown): Record; /** * normalize the serialized tag list * @param value the serialized tags field * @returns the string tags preserved from the payload */ export declare function readTags(value: unknown): string[]; /** * normalize the serialized severity field * @param value the serialized severity value * @returns a valid severity or the default error severity */ export declare function readSeverity(value: unknown): SerializedSeverity; /** * normalize the serialized code field * @param value the serialized code value * @returns the machine-readable code when it is string or number */ export declare function readCode(value: unknown): number | string | undefined; /** * clamp the configured cause depth to a safe integer value * @param value the caller-supplied max depth * @returns the safe max depth used during recursive deserialization */ export declare function normalizeMaxDepth(value: number | undefined): number; /** * determine whether a value is one of the supported severities * @param value the candidate severity value * @returns whether the value is a valid serialized severity member */ export declare function isSeverity(value: unknown): value is SerializedSeverity; export {}; //# sourceMappingURL=fromJson.d.ts.map