/** * Dependency extraction utilities for function-level dependency tracking * * ## Migration: TypeScript Compiler API → tree-sitter * * All `ts.Node`/`ts.SourceFile` parameters have been replaced with `ASTNode`. * TS-specific type guards (`ts.is*`) replaced with `node.type` string checks. */ import type { ASTNode } from '../languages/types.js'; import { FunctionCall, ImportMapping, UsageInfo } from '../types.js'; /** * Extract all function calls within a given AST node */ export declare function extractFunctionCalls(node: ASTNode, sourceCode: string, importMap: Map): FunctionCall[]; /** * Build a map of imports from import statements */ export declare function buildImportMap(root: ASTNode): Map; /** * Resolve a call expression to get call information */ export declare function resolveCallExpression(callExpr: ASTNode, importMap: Map): FunctionCall | undefined; /** * Extract identifier usage within a function to determine which imports are actually used */ export declare function extractIdentifierUsage(node: ASTNode, sourceCode: string, importNames: Set): Map; /** * Get all local function names defined in the file */ export declare function getLocalFunctionNames(root: ASTNode): Set; /** * Normalize a function call target for consistent naming */ export declare function normalizeCallTarget(callee: string, filePath: string, localFunctions: Set): string; //# sourceMappingURL=dependencyExtractor.d.ts.map