Angular Modernizer
    Preparing search index...
    • Analyzes a method using AST body signals to produce a confidence map.

      Only method-body signals are included — class-level and return-type signals are intentionally excluded because they are too ambiguous (e.g., Observable<T> is common for both data-retrieval and event-handling) and cause false overrides for methods with clear name patterns like saveUser().

      Signals collected from method body text with confidence scores based on observed patterns in production Angular codebases:

      • Method body: .next() / .emit() → event-handling (0.95)
      • Method body: .asObservable() → event-handling (0.90)
      • Method body: .getValue() → event-handling (0.75)
      • Method body: HTTP read verbs this.*.get/head/options() → data-retrieval (0.85)
      • Method body: HTTP write verbs this.*.post/put/delete/patch() → data-mutation (0.85)
      • Method body: this.cache / .fromCache → cache-management (0.80)
      • Method body: JSON.parse / JSON.stringify → transformation (0.85)
      • Method body: atob( / btoa( → transformation (0.90)

      Confidence thresholds for callers:

      Parameters

      • method: MethodDeclaration

        The method declaration to analyze

      • _classDecl: ClassDeclaration

        Reserved for future use (class-context signals). Currently unused.

      Returns Map<string, number>

      Map<responsibility, combinedConfidence>

      const map = analyzeMethodAst(method, classDecl);
      const top = [...map.entries()].sort(([, a], [, b]) => b - a)[0];
      if (top && top[1] >= 0.7) {
      console.info(`AST: ${top[0]} (${top[1].toFixed(2)})`);
      }