import ASTNode from "./ast/ASTNode"; import CodeFile from "./CodeFile"; import CodeLocation from "./CodeLocation"; import CodeSpan from "./CodeSpan"; import { SymbolKind } from "./semantic/ASTSymbolLister"; import IncludeResolver from "./semantic/IncludeResolver"; import ScadFileProvider, { WithExportedScopes } from "./semantic/ScadFileProvider"; import Scope from "./semantic/Scope"; export declare class SolutionFile implements WithExportedScopes { solutionManager: SolutionManager; codeFile: CodeFile; ast: ASTNode | null; dependencies: SolutionFile[]; errors: Error[]; includeResolver: IncludeResolver; includedFiles: SolutionFile[]; onlyOwnScope: Scope; constructor(solutionManager: SolutionManager); parseAndProcess(): Promise; getCompletionsAtLocation(loc: CodeLocation): Promise; getSymbols(makeSymbol: (name: string, kind: SymbolKind, fullRange: CodeSpan, nameRange: CodeSpan, children: SymType[]) => SymType): SymType[]; getFormatted(): string; getExportedScopes(): Scope[]; getSymbolDeclaration(loc: CodeLocation): import(".").AssignmentNode | import(".").ModuleDeclarationStmt | import(".").FunctionDeclarationStmt | null; getSymbolDeclarationLocation(loc: CodeLocation): CodeLocation | null; } export default class SolutionManager implements ScadFileProvider { openedFiles: Map; allFiles: Map; notReadyFiles: Map>; /** * Returns a registered solution file for a given path. It supports getting files which have not been fully processed yet. * @param filePath */ getFile(filePath: string): Promise; notifyNewFileOpened(filePath: string, contents: string): Promise; notifyFileChanged(filePath: string, contents: string): Promise; notifyFileClosed(filePath: string): void; protected attachSolutionFile(codeFile: CodeFile): Promise; /** * Checks whether a file is already in the solution, and if not it loads it from disk. * @param filePath The dependent-upon file. */ provideScadFile(filePath: string): Promise; /** * Removes dependencies that aren't directly or indirectly referenced in any of the open files to free memory. */ protected garbageCollect(): void; }