Angular Modernizer
    Preparing search index...

    Abstract Syntax Tree representation with metadata.

    This interface represents the result of parsing a file, including the ts-morph SourceFile, any syntax errors, warnings, and preprocessing metadata (false positives filtered, custom decorators detected, path aliases resolved).

    Metadata Fields:

    • falsePositivesFiltered: Number of false positive errors filtered during preprocessing
    • customDecorators: List of custom decorator names detected (e.g., '@PageComponent')
    • pathAliasesResolved: Number of path aliases resolved (e.g., '@shared/' → '../../shared/')
    const ast: AST = {
    sourceFile: project.createSourceFile('temp.ts', content),
    errors: [
    { message: 'Type "string" is not assignable to type "number"', line: 10, column: 5, code: 'TS2322' }
    ],
    warnings: [
    { message: 'Unused variable "x"', line: 15, column: 7 }
    ],
    falsePositivesFiltered: 3, // Filtered constructor params with "import" keyword
    customDecorators: ['@PageComponent', '@RequiresPermission'],
    pathAliasesResolved: 5 // Resolved 5 import statements with path aliases
    };
    interface ParserAST {
        customDecorators: string[];
        errors: ParserSyntaxError[];
        falsePositivesFiltered: number;
        pathAliasesResolved: number;
        sourceFile: SourceFile;
        warnings: ParserSyntaxError[];
    }
    Index

    Properties

    customDecorators: string[]

    List of custom decorator names detected (e.g., '@PageComponent', '@RemoteFunction')

    Syntax errors detected during parsing (may include false positives)

    falsePositivesFiltered: number

    Number of false positive errors filtered during preprocessing

    pathAliasesResolved: number

    Number of path aliases resolved (e.g., '@shared/' → '../../shared/')

    sourceFile: SourceFile

    ts-morph SourceFile instance for AST manipulation

    warnings: ParserSyntaxError[]

    Non-fatal warnings detected during parsing