/** * @angular-modernizer/plugin-angular - Type Safety Analysis Rule * * Detects four categories of type safety violations across all TypeScript code: * 1. Explicit `any` types on properties, parameters, and return types * 2. Untyped function/method parameters (no type annotation, no default, not rest) * 3. Missing explicit return type annotations on functions and class methods * 4. Class properties with no type annotation and no primitive literal initializer * * Scope: * - Analyzes standalone `FunctionDeclaration` nodes and class `MethodDeclaration` nodes * - Analyzes all `Parameter` and `PropertyDeclaration` descendants * - Skips `.d.ts` declaration files entirely * * Known Limitations: * - Arrow functions (`const fn = () => {}`) and function expressions are NOT scanned * for missing return types. Only `FunctionDeclaration` and `MethodDeclaration` are * analyzed. This is intentional to keep the rule focused on explicit declarations. * * Overlap with MissingReturnTypeRule: * - Both rules flag missing return types on class methods. * - `MissingReturnTypeRule` is Angular-specific: it skips Angular lifecycle hooks * (ngOnInit, ngOnDestroy, etc.) and reports under the Angular framework lens. * - `TypeSafetyAnalysisRule` is general TypeScript type safety: no lifecycle hook * skipping, broader scope including standalone functions. * - Double-reporting is intentional; users can disable one rule if preferred. * * @example * ```typescript * const rule = new TypeSafetyAnalysisRule(); * const results = await rule.analyze({ sourceFile }); * ``` */ import type { AnalysisRule, AnalysisContext, AnalysisResult } from '@angular-modernizer/plugin-system'; export declare class TypeSafetyAnalysisRule implements AnalysisRule { readonly id = "angular:type-safety"; readonly name = "Type Safety"; readonly description = "Detects type safety violations including explicit any, untyped parameters, untyped return types, and untyped class properties"; readonly severity = "warning"; readonly category = "angular-typescript"; readonly tags: string[]; analyze(context: AnalysisContext): Promise; private detectExplicitAny; private detectUntypedParameters; private detectUntypedReturnTypes; private detectUntypedProperties; } //# sourceMappingURL=type-safety.analysis.rule.d.ts.map