Angular Modernizer
    Preparing search index...

    Transform rule angular:extract-static-from-stateful: moves public static methods of classes with instance state to exported module-level functions placed directly above the class, and updates in-file and cross-file references.

    Runs only when the plugin config sets transformationType: 'extract-static-from-stateful'; skips .d.ts files and delegates to StaticExtractTransformOrchestrator.

    // Before
    export class OrderService {
    private orders: Order[] = [];
    static validate(id: string): boolean { return id.length > 0; }
    addOrder(order: Order): void { this.orders.push(order); }
    }

    // After
    export function validate(id: string): boolean { return id.length > 0; }

    export class OrderService {
    private orders: Order[] = [];
    addOrder(order: Order): void { this.orders.push(order); }
    }

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    category: "refactoring" = 'refactoring'

    Rule category for grouping.

    description: "Extracts public static methods from classes with instance state to module-level functions" = 'Extracts public static methods from classes with instance state to module-level functions'

    Rule description explaining what it does.

    id: "angular:extract-static-from-stateful" = 'angular:extract-static-from-stateful'

    Unique rule identifier (scoped to plugin).

    name: "Extract Static Methods from Stateful Class" = 'Extract Static Methods from Stateful Class'

    Human-readable rule name.

    tags: string[] = ...

    Tags for filtering and search.

    Methods