Angular Modernizer
    Preparing search index...

    A single pattern entry in the knowledge base

    interface PatternEntry {
        alignsWithStyle: boolean;
        category: string;
        complexity: "low" | "medium" | "high";
        confidence: number;
        confidenceExplanation: string;
        description: string;
        dominancePercentage: number;
        examples: {
            code: string;
            filePath: string;
            metadata: Record<string, unknown>;
        }[];
        fingerprint: string;
        firstSeen: string;
        id: string;
        lastSeen: string;
        name: string;
        occurrenceHistory: {
            filesAnalyzed: number;
            occurrences: number;
            timestamp: string;
        }[];
        occurrences: number;
        scanCount: number;
        styleAlignment: number;
        suggestedRule?: { detection: string; ruleId: string; severity: string };
        totalOccurrences: number;
        trending: "rising" | "stable" | "declining";
        type: string;
    }
    Index

    Properties

    alignsWithStyle: boolean

    Whether this pattern aligns with codebase style conventions

    category: string

    Pattern category (rxjs-patterns, component-patterns, etc.)

    complexity: "low" | "medium" | "high"

    Pattern complexity level

    confidence: number

    Confidence score (0.0 - 1.0)

    confidenceExplanation: string

    Explanation for the confidence score

    description: string

    Pattern description

    dominancePercentage: number

    Percentage of codebase using this pattern

    examples: { code: string; filePath: string; metadata: Record<string, unknown> }[]

    Example code snippets (anonymized)

    Type Declaration

    • code: string

      Code snippet.

    • filePath: string

      File the example comes from.

    • metadata: Record<string, unknown>

      Additional detector data.

    fingerprint: string

    Pattern fingerprint for deduplication

    firstSeen: string

    When this pattern was first discovered

    id: string

    Unique pattern identifier (hash-based)

    lastSeen: string

    When this pattern was last seen

    name: string

    Human-readable pattern name

    occurrenceHistory: {
        filesAnalyzed: number;
        occurrences: number;
        timestamp: string;
    }[]

    Occurrence history (last N scans)

    Type Declaration

    • filesAnalyzed: number

      Files analyzed in that scan.

    • occurrences: number

      Occurrences found in that scan.

    • timestamp: string

      ISO timestamp of the scan.

    occurrences: number

    Number of occurrences in the last scan

    scanCount: number

    How many scans have detected this pattern

    styleAlignment: number

    Style alignment score (0.0 - 1.0)

    suggestedRule?: { detection: string; ruleId: string; severity: string }

    Suggested rule for this pattern

    Type Declaration

    • detection: string

      How the rule would detect the pattern.

    • ruleId: string

      ID of the suggested rule.

    • severity: string

      Suggested severity.

    totalOccurrences: number

    Total occurrences across all scans

    trending: "rising" | "stable" | "declining"

    Pattern trend across scans

    type: string

    Pattern type (unsubscribed-observable, too-many-inputs, etc.)