import type TSModule from 'typescript';
/**
 * Lazy-load the TypeScript compiler API. Caches after first call.
 * Throws if `typescript` is not installed as a peer dependency.
 */
export declare function getTypeScript(): typeof TSModule;
/** Reset the TS cache — used in tests. */
export declare function resetTypeScriptCache(): void;
/**
 * Parse source code into a TS SourceFile AST node.
 */
export declare function parseSource(source: string, fileName: string): TSModule.SourceFile;
/**
 * Pretty-print a SourceFile AST back to string.
 */
export declare function printSource(sourceFile: TSModule.SourceFile): string;
/**
 * Find all AST nodes of a given SyntaxKind in a source file.
 */
export declare function findNodes(sourceFile: TSModule.SourceFile, kind: TSModule.SyntaxKind): TSModule.Node[];
/**
 * Get 1-based line number for a position in the source file.
 */
export declare function getLineNumber(sourceFile: TSModule.SourceFile, pos: number): number;
/**
 * Create a change record for reporting.
 */
export declare function createChange(line: number, description: string): {
    line: number;
    description: string;
};
/**
 * Apply a text replacement at a specific range in the source string.
 * Replacements must be applied in reverse order (highest position first)
 * to keep earlier positions valid.
 */
export declare function replaceRange(source: string, start: number, end: number, replacement: string): string;
//# sourceMappingURL=ast-utils.d.ts.map