Angular Modernizer
    Preparing search index...

    Analysis rule angular:promise-vs-observable-anti-pattern: reports code that converts RxJS Observables to Promises and loses cancellation, retry and composition:

    1. .toPromise() calls in any class.
    2. async methods of @Component classes.
    3. @Injectable methods returning Promise<T> that wrap HttpClient calls.
    4. Several sequential awaits in one method.
    5. Manual detectChanges() calls after await.
    const rule = new PromiseObservableAnalysisRule();
    const violations = await rule.analyze(context);

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    category: "rxjs" = 'rxjs'

    Rule category for grouping.

    description: "Detects anti-patterns where Observables are converted to Promises, causing memory leaks and lost cancellation" = 'Detects anti-patterns where Observables are converted to Promises, causing memory leaks and lost cancellation'

    Rule description explaining what it checks.

    id: "angular:promise-vs-observable-anti-pattern" = 'angular:promise-vs-observable-anti-pattern'

    Unique rule identifier (scoped to plugin). Format: "plugin-name:rule-name" (e.g., "angular-standalone:component-not-standalone")

    name: "Promise vs Observable Anti-Pattern" = 'Promise vs Observable Anti-Pattern'

    Human-readable rule name.

    severity: "warning" = ...

    Rule severity level.

    tags: string[] = ...

    Tags for filtering and search.

    Methods