/** * @angular-modernizer/plugin-angular - Dto Object Literal Orchestrator * * Contains all business logic for the DTO Object Literal Transform Rule. * Rewrites `const r = new SomeResponse(); r.prop = val;` patterns into * equivalent typed object literals: `const r: SomeResponse = { prop: val };`. * * Only "simple cases" are transformed. A case is simple when: * (a) The NewExpression has zero constructor arguments. * (b) All consecutive ExpressionStatements immediately following the variable * declaration are unconditional property assignments of the form * `varName.prop = value`. Any remaining statements must not assign to * the variable's properties. * (c) The class declaration is resolvable and has an empty or absent constructor * body (syntax-only check — no type inference). * * Idempotency: after rewriting, no NewExpression for the variable remains, so a * second run produces zero candidates and no modifications. */ import type { TransformContext } from '@angular-modernizer/plugin-system'; import type { PublicApi } from '@angular-modernizer/api'; export interface DtoDetectionConfig { classNamePatterns: (string | RegExp)[]; } export interface DtoTransformResult { changeCount: number; skippedCount: number; errors: string[]; } export declare class DtoObjectLiteralOrchestrator { run(context: TransformContext, config: DtoDetectionConfig): DtoTransformResult; private findDtoInstantiations; private isSimpleCase; private rewriteAsObjectLiteral; private isPropertyAssignmentStatement; private containsPropertyAssignmentTo; private resolveClass; private extractClassName; private getClassName; private matchesPattern; } //# sourceMappingURL=dto-object-literal.orchestrator.d.ts.map