import * as ts from 'typescript'; /** * Comprehensive component analysis interface */ export interface DeepComponentAnalysis { className: string; tagName: string; importPath: string; properties: DeepPropertyAnalysis[]; methods: DeepMethodAnalysis[]; events: EventAnalysis[]; baseClass?: string; directBaseClass?: string; mixins: string[]; observedAttributes: string[]; decorators: Array<{ name: string; arguments: string[]; }>; staticProperties: Record; } /** * Enhanced property analysis with deeper reflection */ export interface DeepPropertyAnalysis { name: string; type: string; isGetter: boolean; isSetter: boolean; isStatic: boolean; isPrivate: boolean; hasDecorator: boolean; decoratorType?: string; decoratorArgs?: string[]; defaultValue?: string; jsdocComment?: string; observedAttribute?: string; source?: string; setterParameterType?: string; } /** * Enhanced method analysis with parameter details */ export interface DeepMethodAnalysis { name: string; parameters: Array<{ name: string; type: string; isOptional: boolean; defaultValue?: string; }>; returnType: string; isStatic: boolean; isPrivate: boolean; isAsync: boolean; jsdocComment?: string; isLifecycle: boolean; } /** * Event analysis from actual method implementations */ export interface EventAnalysis { name: string; callSite: string; triggerMethod: 'triggerEvent' | 'triggerVetoableEvent' | 'dispatchEvent'; parameters: string[]; sourceMethod: string; } /** * Deep AST analyzer that uses TypeScript's compiler API for comprehensive reflection */ export declare class DeepASTAnalyzer { private program; private checker; private verbose; private mixinAnalysisCache; private mixinPathCache; private mixinProgramCache; constructor(filePaths: string[], verbose?: boolean, compilerOptions?: ts.CompilerOptions); /** * Performs deep analysis of a web component file */ analyzeComponent(filePath: string): DeepComponentAnalysis | undefined; private generateImportPath; private visitNode; private extractMixinChain; private extractInheritance; private extractMixinNames; private isWebComponentClass; private isCustomElementDecorator; private analyzeComponentClass; private extractClassDecorators; private analyzeDecorator; private analyzeProperty; private analyzeGetter; private handleSetter; private analyzeMethod; private extractModifiers; private extractPropertyDecorator; private isStaticAttributesGetter; private extractObservedAttributes; private extractEventsFromClass; private isEventTriggerMethod; private isLifecycleMethod; private extractJSDocComment; private deriveAttributeName; private convertConstantToKebab; /** * Analyzes mixin properties dynamically by parsing mixin files and adds them to the component analysis. * This ensures that properties from mixins like IdsClearableMixin are included * in the generated Angular directives. */ private analyzeMixinProperties; /** * Analyzes a mixin file to extract its properties and methods with caching. * This method dynamically parses the actual mixin implementation. */ private analyzeMixinFile; /** * Resolves the file path for a given mixin name with caching. */ private resolveMixinPath; /** * Analyzes the class expression inside a mixin to extract properties. */ private analyzeMixinClass; /** * Analyzes a getter in a mixin class. */ private analyzeMixinGetter; /** * Handles a setter in a mixin class. */ private handleMixinSetter; /** * Analyzes a property declaration in a mixin class. */ private analyzeMixinProperty; /** * Infers type from getter implementation when type annotation is missing. */ private inferTypeFromMixinGetter; /** * Infers type from setter parameter when type annotation is missing. */ private inferTypeFromMixinSetter; /** * Clears all mixin analysis caches to free memory or force fresh analysis. */ clearMixinCaches(): void; /** * Gets cache statistics for performance monitoring. */ getCacheStats(): { analysisCache: { size: number; entries: string[]; }; pathCache: { size: number; entries: string[]; }; programCache: { size: number; entries: string[]; }; }; /** * Prints cache statistics to // console for debugging. */ printCacheStats(): void; } //# sourceMappingURL=deep-ast-analyzer.d.ts.map