import type { SyntaxNode } from './parser.js'; import type { StringNode } from './stringNode.js'; /** * Callback to parse a return expression into a StringNode. * Provided by the caller so function resolution doesn't need to know about * declare_var, derive, imports, etc. * * @param node - The return expression AST node * @param rootNode - The root AST node of the file containing the function * @param filePath - The absolute path of the file containing the function */ export type ExpressionParser = (node: SyntaxNode, rootNode: SyntaxNode, filePath: string) => Promise; /** * Resolves all return values of a function defined in the current file's AST. * Uses the provided expression parser to handle complex return expressions * (concat, declare_var, etc.). */ export declare function resolveFunctionInCurrentFile(functionName: string, rootNode: SyntaxNode, filePath: string, parseExpr: ExpressionParser): Promise; /** * Resolves all return values of a function defined in an external file. * Follows re-export chains: if the function isn't defined in the target file * but is imported from another module, follows the import to the source. * Results are cached by filePath::functionName. */ export declare function resolveFunctionInFile(functionName: string, filePath: string, parseExpr: ExpressionParser, visited?: Set): Promise; export declare function clearFunctionCache(): void;