import Parser from 'tree-sitter'; import type { SyntaxNode } from 'tree-sitter'; import { type Definition } from '../definition-extractor.js'; import type { LanguageAdapter } from '../language-adapter.js'; import { type FileReference, type InternalSymbolUsage } from '../reference-extractor.js'; import type { WorkspaceMap } from '../workspace-resolver.js'; /** * TypeScriptAdapter implements language support for TypeScript, JavaScript, TSX, and JSX files. * It wraps existing parser initialization and extractor logic into the LanguageAdapter pattern. */ export declare class TypeScriptAdapter implements LanguageAdapter { readonly languageId = "typescript"; readonly fileExtensions: string[]; readonly defaultIgnorePatterns: string[]; private typescriptParser; private tsxParser; private javascriptParser; constructor(); /** * Get the appropriate parser for a given file path based on extension. */ getParser(filePath: string): Parser; /** * Extract all top-level definitions from the syntax tree. * Delegates to the existing extractDefinitions function. */ extractDefinitions(rootNode: SyntaxNode): Definition[]; /** * Extract all import/export references from the syntax tree. * Delegates to the existing extractReferences function. */ extractReferences(rootNode: SyntaxNode, filePath: string, knownFiles: Set, workspaceMap?: WorkspaceMap | null): FileReference[]; /** * Extract internal symbol usages within the same file. * Delegates to the existing extractInternalUsages function. */ extractInternalUsages(rootNode: SyntaxNode, definitions: Definition[]): InternalSymbolUsage[]; /** * Resolve an import path to an absolute file path. * Delegates to the existing resolveImportPath function. */ resolveImportPath(source: string, fromFile: string, knownFiles: Set, workspaceMap?: WorkspaceMap | null): string | null; } //# sourceMappingURL=typescript-adapter.d.ts.map