import type { TransformContext } from '@angular-modernizer/plugin-system'; import type { PublicApi } from '@angular-modernizer/api'; export interface StaticClassTransformResult { classesTransformed: number; functionsCreated: number; constantsCreated: number; inFileRefsUpdated: number; crossFileCallersUpdated: number; skipped: string[]; } /** * StaticClassTransformOrchestrator * * Scans every class in the source file, identifies static-only classes, and * transforms each one to module-level function/const declarations in-place. * In-file ClassName.member() references are rewritten to bare member() calls. * * Out of scope: cross-file import rewrites. Callers in other files must be * updated manually or by a future "import-rewrite" pass. * * Idempotency: after transformation the class no longer exists, so a second * run finds nothing to transform. */ export declare class StaticClassTransformOrchestrator { run(context: TransformContext): StaticClassTransformResult; private isEligible; private isValidIdentifier; private hasCtorLogic; private propertyToConst; private methodToFunction; /** * Rewrites `ClassName.member` → `member` in plain text (method body strings). * Uses word-boundary regex to avoid partial matches. */ private rewriteRefsInText; /** * Updates all other project files that import ClassName from the transformed file: * - Removes the `ClassName` named import from their import declaration. * - Adds a named import for each extracted member (function/const). * - Rewrites `ClassName.member` call sites to bare `member` references. * * Skipped: aliased imports (`import { Cls as Alias }`), type-only callers * (handled separately by TypeScript), and .d.ts files. */ private rewriteCrossFileCallers; /** * Rewrites remaining `ClassName.member` references in the file via live AST * (for refs that were outside the class body — other functions, top-level code, etc.). * Processes nodes in reverse order to preserve positions. */ private rewriteExternalRefs; private escapeRegExp; } //# sourceMappingURL=static-class-transform.orchestrator.d.ts.map