import { default as Compiler } from '../../../compiler'; import { SymbolKind } from '../../../core/types'; import { Filepath } from '../../../core/types/filepath'; import { UseDeclarationNode } from '../../../core/types/nodes'; export interface ParsedUseSpecifier { kind?: string; name: string; alias?: string; } export interface ParsedUseStatement { startOffset: number; endOffset: number; sourceFile: string; specifiers: ParsedUseSpecifier[]; node: UseDeclarationNode; } export interface UseStatementMergeResult { topInsert: string; removeRange?: { startOffset: number; endOffset: number; }; } export declare function scanExistingUses(compiler: Compiler, filepath: Filepath): ParsedUseStatement[]; /** Merge a new symbol into the file's use statements. * If a use from sourceFile exists, add the symbol to it. * If not, create a new use statement at the top. */ export declare function mergeSymbolIntoUses(compiler: Compiler, symbolName: string, symbolKind: SymbolKind, sourceFilepath: Filepath, currentFilepath: Filepath, fileContent: string): UseStatementMergeResult;