Angular Modernizer
    Preparing search index...

    Contiguous chunk of changes in a file. Represents a unified diff hunk with rich metadata.

    {
    oldStart: 10,
    oldLines: 5,
    newStart: 10,
    newLines: 7,
    header: '@@ -10,5 +10,7 @@ export class UserComponent',
    changes: [...],
    summary: {
    additions: 2,
    deletions: 0,
    contextLines: 5
    }
    }
    interface DiffHunk {
        changes: LineChange[];
        containingBlock?: string;
        header: string;
        newLines: number;
        newStart: number;
        oldLines: number;
        oldStart: number;
        summary: { additions: number; contextLines: number; deletions: number };
    }
    Index

    Properties

    changes: LineChange[]

    Individual line changes in this hunk. Ordered sequentially as they appear in the file.

    containingBlock?: string

    Optional function/class/block name containing this hunk. Helps AI understand the scope of changes.

    'UserComponent.ngOnInit'
    
    header: string

    Unified diff header line.

    '@@ -10,5 +10,7 @@ export class UserComponent'
    
    newLines: number

    Number of lines in new version.

    newStart: number

    Starting line number in new version.

    oldLines: number

    Number of lines in old version.

    oldStart: number

    Starting line number in old version.

    summary: { additions: number; contextLines: number; deletions: number }

    Summary statistics for this hunk.

    Type Declaration

    • additions: number

      Added lines in this hunk.

    • contextLines: number

      Unchanged context lines in this hunk.

    • deletions: number

      Deleted lines in this hunk.