/** * @angular-modernizer/plugin-angular - Any to Interface Analysis Rule * * Detects `any`-typed parameters and class properties that are accessed by * property name, indicating a named shape that can be replaced with a * generated TypeScript interface. * * Detection scope: * - `Parameter` nodes typed as `any` whose identifier is accessed via dot * notation inside the containing function/method body. * - `PropertyDeclaration` nodes typed as `any` whose name is accessed via * `this..` inside the containing class body. * * Skipped: * - `any[]` — ArrayType parent nodes are ignored. * - `.d.ts` declaration files. * - Parameters or properties with no downstream property accesses (no named * shape can be inferred). * * @example * ```typescript * const rule = new AnyToInterfaceAnalysisRule(); * const results = await rule.analyze({ sourceFile }); * // results[0].metadata.accessedProperties → ['userId', 'name'] * // results[0].metadata.suggestedInterfaceName → 'IData' * ``` */ import type { AnalysisRule, AnalysisContext, AnalysisResult } from '@angular-modernizer/plugin-system'; export declare class AnyToInterfaceAnalysisRule implements AnalysisRule { readonly id = "angular:any-to-interface"; readonly name = "Any to Interface"; readonly description = "Detects any-typed parameters and properties that are accessed by name and can be replaced with a generated interface"; readonly severity = "warning"; readonly category = "angular-typescript"; readonly tags: string[]; private readonly DOM_EVENT_PROPERTIES; private readonly EVENT_PARAM_NAMES; private readonly ARRAY_PROTOTYPE_METHODS; private readonly STRING_PROTOTYPE_METHODS; private isKnownDomEvent; private isArrayLikeUsage; private isStringLikeUsage; analyze(context: AnalysisContext): Promise; private detectAnyNodes; /** * Collects property names accessed as `identifierName.propName` within the * given scope node. Handles the parameter case. */ private collectPropertyAccesses; /** * Collects property names accessed as `this.propertyName.propName` within the * given scope node. Handles the class property case. */ private collectThisPropertyAccesses; private buildInterfaceName; } //# sourceMappingURL=any-to-interface.analysis.rule.d.ts.map