import { type ClassDeclaration, type MethodDeclaration, Scope } from 'ts-morph'; /** * Metadata about a property used by methods. */ export interface PropertyUsage { name: string; type: string; scope: Scope; isReadonly: boolean; accessType: 'read' | 'write' | 'both'; initializer?: string; } /** * Analyzes which properties are used by which methods. * * This helper scans method bodies for property accesses and extracts * full property metadata from the class declaration. * * @example * ```typescript * const analyzer = new PropertyDependencyAnalyzer(); * const properties = analyzer.analyzePropertyUsage(classDecl, methods); * // Returns: [{ name: '_configParams', type: 'IConfigParam[]', scope: Private, ... }] * ``` */ export declare class PropertyDependencyAnalyzer { /** * Analyzes which properties are used by the provided methods. * * Detection Strategy: * - Scans method bodies for `this.propertyName` patterns * - Determines read vs write access (assignment vs usage) * - Extracts property declarations from original class * - Returns full property metadata for code generation * * @param classDecl - The class declaration containing the properties * @param methods - The methods to analyze for property usage * @returns Array of property usage metadata */ analyzePropertyUsage(classDecl: ClassDeclaration, methods: MethodDeclaration[]): PropertyUsage[]; /** * Extracts property declaration metadata from class. * Includes type, scope, readonly, initializer. * * @param classDecl - The class declaration * @param propertyName - The property name to extract * @returns Property metadata or undefined if not found */ private extractPropertyMetadata; /** * Determines if property is read, written, or both in method body. * * @param methodBody - The method body text * @param propertyName - The property name to check * @returns Access type: 'read', 'write', or 'both' */ private determineAccessType; } //# sourceMappingURL=property-dependency-analyzer.d.ts.map