import * as ts from 'typescript'; export interface AstChange { start: number; end: number; replacement: string; } export declare function applyChanges(content: string, changes: AstChange[]): string; /** * Removes named imports from a module matching `fromModulePattern`. * If the import statement becomes empty, removes the entire statement. * Returns the changes and the list of names that were actually removed. */ export declare function buildRemoveNamedImportsChanges(sourceFile: ts.SourceFile, names: string[], fromModulePattern: string): { changes: AstChange[]; removedNames: string[]; }; /** * Inserts `import { name } from 'fromModule';` after the last existing import statement. * If no imports exist, prepends to the file. */ export declare function insertImportStatement(content: string, name: string, fromModule: string): string; export declare const ngModule: { replaceInImports(sourceFile: ts.SourceFile, remove: string[], add: string): AstChange[]; replaceInExports(sourceFile: ts.SourceFile, remove: string[], add: string): AstChange[]; }; export declare const ngComponent: { replaceInImports(sourceFile: ts.SourceFile, remove: string[], add: string): AstChange[]; }; /** * Removes a property assignment from an object literal, handling comma cleanup. * - Non-last property: removes from property start to next property start (trailing comma). * - Last property: removes from previous property end to this property end (leading comma). * - Only property: removes the property content, leaving empty braces. */ export declare function buildRemoveObjectPropertyChange(sourceFile: ts.SourceFile, obj: ts.ObjectLiteralExpression, prop: ts.PropertyAssignment): AstChange[];