import type { FileReader } from "../filesystem/file-reader.js"; import type { FileWriter } from "../filesystem/file-writer.js"; import type { SkottNode } from "../graph/node.js"; import type { Logger } from "../logger.js"; import type { SkottConfig, SkottStructure } from "../skott.js"; export declare function createInitialSkottNodeValue(id: string): SkottNode; export interface SkottCachedNode { hash: string; value: SkottNode; } export type SkottCache = { configurationHash: string; sourceFiles: Map["id"], SkottCachedNode>; }; export declare const kSkottCacheFileName: string; export declare class SkottCacheHandler { #private; private readonly fileReader; private readonly fileWriter; private readonly config; private readonly logger; constructor(fileReader: FileReader, fileWriter: FileWriter, config: SkottConfig, logger: Logger); get store(): SkottCache; private createCache; get(fileId: string): SkottCachedNode | undefined; /** * When stored, nodes paths are absolute hence not ECMAScript compliant for * imports declarations. When reading them again, we must be sure to put a * compliant path again so that they can be looked up correctly. */ restoreFileRelativePath(moduleName: string, baseDir: string): string; restoreModuleDeclarations(node: SkottCachedNode, baseDir: string): Set; addSourceFile(fileId: string, fileContent: string): void; save(latestComputedGraph: SkottStructure["graph"]): Promise; }