/** * @angular-modernizer/plugin-angular - Performance Violation Rule * * Detects Angular performance violations that can cause memory leaks and poor performance. * * Detection Patterns: * - Observable subscriptions without proper cleanup * - Missing ngOnDestroy lifecycle hook when subscriptions exist * - Components with too many subscriptions * - Subscriptions in constructors or field initializers * * This rule helps prevent memory leaks and improve Angular application performance. */ import type { AnalysisRule, AnalysisContext, AnalysisResult } from '@angular-modernizer/plugin-system'; /** * Performance Violation Rule - detects performance issues and memory leaks. */ export declare class PerformanceViolationRule implements AnalysisRule { readonly id = "angular:performance-violation"; readonly name = "Performance Violation"; readonly description = "Detects Angular performance violations that can cause memory leaks and poor performance"; readonly severity = "error"; readonly category = "angular-performance"; readonly tags: string[]; analyze(context: AnalysisContext): Promise; private analyzeClass; private isAngularClass; private findSubscriptions; /** * Detects subscription patterns in a given text. * @param text - The text to analyze for subscription patterns. * @param allowTypeAnnotations - Whether to allow type annotations (for expressions). * @returns The subscription type if found, null otherwise. */ private detectSubscriptionPattern; private detectSubscriptionInExpression; private detectSubscriptionInStatement; private hasNgOnDestroy; } //# sourceMappingURL=angular-performance-violation.rule.d.ts.map