/** * @angular-modernizer/plugin-angular - Constructor Injection Transform Orchestrator * * Orchestrator that converts manual service instantiation (new Service()) * to inject(Service) calls, handles DIP violations, and validates by service suffixes. * * Philosophy: "Thin Rule, Thick Orchestrator" * - The orchestrator contains all business logic * - The rule is a minimal protocol wrapper * - Complex AST manipulation happens here */ import type { TransformContext } from '@angular-modernizer/plugin-system'; import type { PublicApi } from '@angular-modernizer/api'; /** * Orchestrator for transforming manual service instantiation to inject() calls. * * @remarks * This orchestrator handles the complex logic for: * - Detecting manual service instantiation patterns (`new Service()`) * - Converting them to `inject(Service)` calls * - Adding inject imports when needed * - Handling DIP violations in property initializers * - Validating service classes using ServicePatternRecognizer * * The orchestrator uses ServicePatternRecognizer for centralized service * pattern detection with confidence scoring. * * @public */ export declare class ConstructorInjectionTransformOrchestrator { /** * Classes that should NOT be transformed (native JS objects, DTOs, etc.) */ private readonly excludedClasses; /** * Run the constructor injection transformation on the given context. * * @param context - Transform context with source file and project access * * @public */ run(context: TransformContext): void; /** * Transform a property declaration with manual service instantiation. * * @param propDecl - The property declaration to transform * @param _context - Transform context (unused) * @returns true if a transformation occurred, false otherwise * * @private */ private transformPropertyDeclaration; /** * Check if a class name represents a service class. * Uses ServicePatternRecognizer with confidence scoring. * * @param className - The class name to check * @param context - Transform context with API access * @returns True if this is a service class * * @private */ private isServiceClass; /** * Find the source file containing a class definition. * * @param className - The class name to search for * @param context - Transform context with project access * @returns Source file if found, undefined otherwise * * @private */ private findSourceFileForClass; /** * Ensure the inject function is imported from @angular/core. * * @param sourceFile - The source file to add the import to * @param api - The PublicApi with import management tools * * @private */ private ensureInjectImport; } //# sourceMappingURL=constructor-injection-transform-orchestrator.d.ts.map