import { LRUCache } from 'lru-cache'; import type { DocumentUri } from 'vscode-languageserver-protocol'; import type { IDocContext } from '../document_transformer_service'; /** * Least Recently Used (LRU) cache for storing the most recently accessed files in the workspace. * The cache is used to provide context-aware suggestions and is one * resolution strategy for the Advanced Context Resolver. * We discard the least recently used files when the cache is full. */ export declare class LruCache { #private; private constructor(); static getInstance(maxSize: number): LruCache; static destroyInstance(): void; get openFiles(): LRUCache; /** * Update the file in the cache. * Uses lru-cache under the hood. */ updateFile(context: IDocContext): LRUCache; /** * @returns `true` if the file was deleted, `false` if the file was not found */ deleteFile(uri: DocumentUri): boolean; /** * Get the most recently accessed files in the workspace * @param context - The current document context `IDocContext` * @param includeCurrentFile - Include the current file in the list of most recent files, default is `true` */ mostRecentFiles({ context, includeCurrentFile, }: { context?: IDocContext; includeCurrentFile?: boolean; }): IDocContext[]; }