UNPKG

sicua

Version:

A tool for analyzing project structure and dependencies

40 lines (39 loc) 1.21 kB
import { ErrorBoundary, FallbackElement, ErrorHandlingLocation } from "../../../types/errorHandling.types"; /** * Types for serialized versions of complex objects */ export interface SerializableErrorBoundary { library: { name: string; source: string; type: string; features: string[]; importPath: string; }; props: Record<string, any>; location: ErrorHandlingLocation; } export interface SerializableFallbackElement { element: string; condition?: string; relatedErrorStates: string[]; location: ErrorHandlingLocation; } /** * Utilities for serializing error handling analysis objects */ export declare class SerializationUtils { /** * Serializes a fallback element for JSON output */ static serializeFallbackElement(element: FallbackElement): SerializableFallbackElement; /** * Serializes an error boundary for JSON output */ static serializeErrorBoundary(boundary: ErrorBoundary): SerializableErrorBoundary; /** * Verifies that an object can be serialized to JSON * @throws Error if the object contains circular references */ static verifySerializable(object: any): void; }