/** * @angular-modernizer/plugin-angular - RxJS Optimization Rule * * Detects inefficient RxJS operator usage and suggests optimizations for better performance and maintainability. * * Detection Patterns: * - Multiple chained .pipe() calls (should consolidate) * - Missing shareReplay() for expensive operations (HTTP calls) * - Redundant sequential operators (map → map, filter → filter) * - Missing debounceTime()/throttleTime() on user input streams * - Business logic inside .subscribe() blocks (should use pipe operators) * - Nested observable calls inside subscribe (should use flattening operators) * * This rule helps improve RxJS performance and code maintainability. */ import type { AnalysisRule, AnalysisContext, AnalysisResult } from '@angular-modernizer/plugin-system'; export interface RxJSOptimizationConfig { maxPipeChains: number; maxConsecutiveOperators: number; requireDebounceOnUserInput: boolean; maxSubscribeComplexity: number; } /** * RxJS Optimization Rule - detects inefficient RxJS operator usage and optimization opportunities. */ export declare class RxJSOptimizationRule implements AnalysisRule { readonly id = "plugin-angular:rxjs-optimization"; readonly name = "RxJS Optimization"; readonly description = "Detects inefficient RxJS operator usage and suggests optimizations for better performance and maintainability"; readonly severity = "warning"; readonly category = "rxjs-optimization"; readonly tags: string[]; private readonly config; constructor(config?: Partial); analyze(context: AnalysisContext): Promise; private analyzeClass; private detectMultiplePipeChains; private detectMissingShareReplay; private detectRedundantOperators; private detectMissingDebounce; private detectLogicInSubscribe; private detectSubscribeInSubscribe; private detectIncorrectSubjectUsage; /** * Detects HTTP observables that silently swallow errors via catchError returning * of(null), of([]), of(undefined), or EMPTY — callers cannot distinguish success * from failure. */ private detectSilentHttpCatchError; private isHttpCall; private getParentChain; } //# sourceMappingURL=rxjs-optimization.rule.d.ts.map