Angular Modernizer
    Preparing search index...

    Analysis rule angular:any-to-interface.

    Detects any-typed parameters and class properties that are accessed by property name, indicating a named shape that can be replaced with a generated TypeScript interface.

    Detection scope:

    • Parameter nodes typed as any whose identifier is accessed via dot notation inside the containing function/method body.
    • PropertyDeclaration nodes typed as any whose name is accessed via this.<prop>.<member> inside the containing class body.

    Skipped:

    • any[]: ArrayType parent nodes are ignored.
    • .d.ts declaration files.
    • Parameters or properties with no downstream property accesses (no named shape can be inferred).
    const rule = new AnyToInterfaceAnalysisRule();
    const results = await rule.analyze(context);
    // results[0].metadata.accessedProperties -> ['userId', 'name']
    // results[0].metadata.suggestedInterfaceName -> 'IData'

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    category: "angular-typescript" = 'angular-typescript'

    Rule category for grouping.

    description: "Detects any-typed parameters and properties that are accessed by name and can be replaced with a generated interface" = 'Detects any-typed parameters and properties that are accessed by name and can be replaced with a generated interface'

    Rule description explaining what it checks.

    id: "angular:any-to-interface" = 'angular:any-to-interface'

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

    name: "Any to Interface" = 'Any to Interface'

    Human-readable rule name.

    severity: "warning" = 'warning'

    Rule severity level.

    tags: string[] = ...

    Tags for filtering and search.

    Methods