UNPKG

@stacksjs/stx

Version:

A performant UI Framework. Powered by Bun.

47 lines 1.08 kB
/** * Create a story error */ export declare function createStoryError(type: StoryErrorType, message: string, details?: Partial<StoryError>): StoryError; /** * Format error for display */ export declare function formatStoryError(error: StoryError): string; /** * Generate error display HTML */ export declare function generateErrorHTML(error: StoryError): string; /** * Get error styles */ export declare function getErrorStyles(): string; /** * Create error boundary wrapper */ export declare function createErrorBoundary(content: string, componentName: string): string; /** * Story error */ export declare interface StoryError { type: StoryErrorType message: string file?: string line?: number column?: number stack?: string suggestions?: string[] } /** * STX Story - Error Handling * Graceful error display and recovery suggestions */ /** * Story error types */ export type StoryErrorType = | 'parse_error' | 'component_error' | 'render_error' | 'config_error' | 'file_not_found' | 'circular_dependency' | 'prop_type_error' | 'unknown'