Success result interface

interface SuccessResult<T> {
    data: T;
    error?: undefined;
    metadata: {
        executionTime: number;
        filesAffected?: string[];
        linesProcessed?: number;
        operation: string;
        timestamp: Date;
    };
    success: true;
}

Type Parameters

  • T

Hierarchy (view full)

Properties

data: T

Data returned by the operation (if successful)

error?: undefined

Error message (if operation failed)

metadata: {
    executionTime: number;
    filesAffected?: string[];
    linesProcessed?: number;
    operation: string;
    timestamp: Date;
}

Operation metadata for debugging and monitoring

Type declaration

  • executionTime: number

    Time taken to execute the operation (in milliseconds)

  • OptionalfilesAffected?: string[]

    List of files that were affected by the operation

  • OptionallinesProcessed?: number

    Number of lines processed during the operation

  • operation: string

    Name of the operation performed

  • timestamp: Date

    When the operation was executed

success: true

Whether the operation completed successfully