sicua
Version:
A tool for analyzing project structure and dependencies
62 lines (61 loc) • 2.26 kB
TypeScript
import ts from "typescript";
import { ComponentRelation, IConfigManager, ScanResult } from "../../types";
import { ErrorHandlingCompleteAnalysis } from "../../types/errorHandling.types";
/**
* Enhanced main analyzer for error handling in React applications with dynamic project structure support
*/
export declare class ErrorHandlingAnalyzer {
private program;
private sourceFiles;
private components;
private typeChecker;
private config;
private scanResult;
/**
* Create a new ErrorHandlingAnalyzer with enhanced project structure integration
*
* @param files - Array of file paths to analyze
* @param components - Component relations to analyze
* @param config - Enhanced config manager with project structure info
* @param scanResult - Complete scan result with all project data
* @param program - Optional pre-built TypeScript program from projectAnalyzer
* @param typeChecker - Optional pre-built type checker from projectAnalyzer
*/
constructor(files: string[], components: ComponentRelation[], config?: IConfigManager, scanResult?: ScanResult, program?: ts.Program, typeChecker?: ts.TypeChecker);
/**
* Initialize TypeScript program with enhanced configuration detection
*/
private initializeTypeScriptProgram;
/**
* Create fallback scan result if not provided
*/
private createFallbackScanResult;
/**
* Analyze error handling across all components and functions with enhanced project structure awareness
*/
analyze(): ErrorHandlingCompleteAnalysis;
/**
* Add project-specific insights based on detected structure
*/
private addProjectSpecificInsights;
/**
* Analyze Next.js specific error handling patterns
*/
private analyzeNextJsSpecificPatterns;
/**
* Collect library usage statistics from error boundaries with enhanced detection
*/
private collectLibraryUsage;
/**
* Get project structure information
*/
getProjectStructure(): import("../../types").ProjectStructureDetection | null;
/**
* Get configuration manager
*/
getConfig(): IConfigManager;
/**
* Get scan result data
*/
getScanResult(): ScanResult;
}