Angular Modernizer
    Preparing search index...

    Interface ParserTransformResult

    Transformation result from parser.

    This interface represents the result of applying transformation rules to an AST. It includes the modified source code, metadata about the transformation, and any errors encountered.

    Note: This is a simplified version for the parser strategy interface. The full TransformResult interface is defined in transformation-coordinator.ts.

    const result: TransformResult = {
    ruleId: 'standalone:migrate-to-standalone',
    modified: true,
    message: 'Successfully migrated component to standalone',
    filePath: 'src/app/user/user.component.ts',
    changeCount: 7,
    metadata: {
    duration: 1200,
    syntaxErrors: [],
    parserStrategy: 'enhanced',
    falsePositivesFiltered: 3,
    pathAliasesResolved: 2
    }
    };
    interface ParserTransformResult {
        changeCount?: number;
        filePath?: string;
        message: string;
        metadata?: {
            duration?: number;
            falsePositivesFiltered?: number;
            parserStrategy?: string;
            pathAliasesResolved?: number;
            syntaxErrors?: string[];
            [key: string]: unknown;
        };
        modified: boolean;
        ruleId: string;
    }
    Index

    Properties

    changeCount?: number

    Number of lines changed (additions + deletions)

    filePath?: string

    Path to the file that was transformed

    message: string

    Human-readable message about the transformation

    metadata?: {
        duration?: number;
        falsePositivesFiltered?: number;
        parserStrategy?: string;
        pathAliasesResolved?: number;
        syntaxErrors?: string[];
        [key: string]: unknown;
    }

    Optional metadata about the transformation

    Type Declaration

    • [key: string]: unknown

      Additional metadata

    • Optionalduration?: number

      Time taken to transform (milliseconds)

    • OptionalfalsePositivesFiltered?: number

      Number of false positives filtered

    • OptionalparserStrategy?: string

      Parser strategy used

    • OptionalpathAliasesResolved?: number

      Number of path aliases resolved

    • OptionalsyntaxErrors?: string[]

      Syntax errors after transformation

    modified: boolean

    Whether the file was modified

    ruleId: string

    Rule ID that produced this result