Angular Modernizer
    Preparing search index...

    Transform rule angular:dto-object-literal-transform: rewrites a DTO new X() followed by sequential property assignments into an object literal.

    Runs only when the plugin config sets transformationType: 'dto-object-literal'; skips .d.ts files and delegates to DtoObjectLiteralOrchestrator. By default, classes whose names end in Response, Dto or Result are treated as DTOs.

    // Before
    const r = new UserResponse();
    r.id = 1;
    r.name = 'Alice';

    // After
    const r = { id: 1, name: 'Alice' };

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    category: "modernization" = 'modernization'

    Rule category for grouping.

    description: "Rewrites direct new X() DTO instantiation with sequential property assignments into typed object literals" = 'Rewrites direct new X() DTO instantiation with sequential property assignments into typed object literals'

    Rule description explaining what it does.

    id: "angular:dto-object-literal-transform" = 'angular:dto-object-literal-transform'

    Unique rule identifier (scoped to plugin).

    name: "DTO Object Literal Transform" = 'DTO Object Literal Transform'

    Human-readable rule name.

    tags: string[] = ...

    Tags for filtering and search.

    Methods