UNPKG

typeref-mcp

Version:

TypeScript type inference and symbol navigation MCP server for Claude Code

33 lines 2.59 kB
import { LanguageAdapter, CacheManager, FileWatcher, Logger, DiagnosticInfo, FileChangeType } from '../interfaces.js'; import { SymbolInfo, TypeInfo, ReferenceInfo, ModuleInfo, ProjectIndex, TypeInferenceResult, SymbolSearchOptions, TypeSearchOptions, LanguageConfig } from '../types.js'; export declare abstract class BaseLanguageAdapter implements LanguageAdapter { readonly config: LanguageConfig; protected cache: CacheManager; protected watcher: FileWatcher; protected logger: Logger; protected projectIndexes: Map<string, ProjectIndex>; protected isInitialized: boolean; constructor(config: LanguageConfig, cache: CacheManager, watcher: FileWatcher, logger: Logger); initialize(projectPath: string): Promise<void>; abstract indexProject(projectPath: string, force?: boolean): Promise<ProjectIndex>; abstract getTypeInference(filePath: string, position: number, projectPath: string): Promise<TypeInferenceResult | null>; abstract getTypeDefinition(typeName: string, projectPath: string, contextFile?: string): Promise<TypeInfo | null>; abstract findSymbol(symbolName: string, projectPath: string, options?: SymbolSearchOptions): Promise<SymbolInfo[]>; abstract findReferences(symbolName: string, filePath: string, projectPath: string): Promise<ReferenceInfo[]>; abstract getAvailableSymbols(filePath: string, position: number, projectPath: string): Promise<SymbolInfo[]>; abstract getModuleInfo(modulePath: string, projectPath: string): Promise<ModuleInfo | null>; abstract searchTypes(options: TypeSearchOptions, projectPath: string): Promise<TypeInfo[]>; abstract getDiagnostics(filePath: string, projectPath: string): Promise<DiagnosticInfo[]>; dispose(): Promise<void>; protected getCacheKey(projectPath: string, operation: string, ...args: string[]): string; protected getProjectIndex(projectPath: string): ProjectIndex | null; protected setProjectIndex(projectPath: string, index: ProjectIndex): void; protected handleFileChange(eventType: FileChangeType, filePath: string, projectPath: string): Promise<void>; protected handleFileUpdate(filePath: string, _projectPath: string): Promise<void>; protected handleFileDelete(filePath: string, _projectPath: string): Promise<void>; protected shouldIncludeFile(filePath: string): boolean; protected getFileExtension(filePath: string): string; protected matchesPattern(filePath: string, pattern: string): boolean; protected validateProjectPath(projectPath: string): void; } //# sourceMappingURL=BaseLanguageAdapter.d.ts.map