/**
 * Shared AST helper functions used by multiple visitors (dataflow, etc.).
 *
 * Extracted from dataflow.js to be reusable across the visitor framework.
 */
import type { TreeSitterNode } from '../types.js';
interface ParamInfo {
    name: string;
    index: number;
}
interface LanguageRules {
    nameField: string;
    varAssignedFnParent?: string;
    pairFnParent?: string;
    assignmentFnParent?: string;
    assignLeftField?: string;
    paramIdentifier: string;
    paramWrapperTypes: Set<string>;
    defaultParamType?: string;
    restParamType?: string;
    objectDestructType?: string;
    shorthandPropPattern?: string;
    pairPatternType?: string;
    arrayDestructType?: string;
    extraIdentifierTypes?: Set<string>;
    callFunctionField: string;
    memberNode: string;
    memberPropertyField: string;
    memberObjectField: string;
    optionalChainNode?: string;
    extractParamName?(node: TreeSitterNode): string[] | null;
}
/**
 * Truncate a string to a maximum length.
 */
export declare function truncate(str: string, max?: number): string;
/**
 * Get the name of a function node from the AST using rules.
 */
export declare function functionName(fnNode: TreeSitterNode | null, rules: LanguageRules): string | null;
/**
 * Extract parameter names and indices from a formal_parameters node.
 */
export declare function extractParams(paramsNode: TreeSitterNode | null, rules: LanguageRules): ParamInfo[];
/**
 * Extract parameter names from a single parameter node.
 */
export declare function extractParamNames(node: TreeSitterNode | null, rules: LanguageRules): string[];
/**
 * Check if a node type is identifier-like for this language.
 */
export declare function isIdent(nodeType: string, rules: LanguageRules): boolean;
/**
 * Resolve the name a call expression is calling using rules.
 */
export declare function resolveCalleeName(callNode: TreeSitterNode, rules: LanguageRules): string | null;
/**
 * Get the receiver (object) of a member expression using rules.
 */
export declare function memberReceiver(memberExpr: TreeSitterNode, rules: LanguageRules): string | null;
/**
 * Collect all identifier names referenced within a node.
 */
export declare function collectIdentifiers(node: TreeSitterNode | null, out: string[], rules: LanguageRules): void;
export {};
//# sourceMappingURL=visitor-utils.d.ts.map