import ts from 'typescript';
import { CompilerContext } from '../compilerContext.js';
import type { CallGraphNode } from '../discovery/callGraph.js';
/**
 * A module-scope async function eligible for CFG-level inlining.
 */
export interface InlinableHelper {
    readonly symbol: ts.Symbol;
    readonly declaration: ts.FunctionDeclaration | ts.ArrowFunction;
    readonly parameters: readonly ts.ParameterDeclaration[];
    readonly body: ts.Block;
}
/**
 * A binding from an inlined helper's parameter to the call-site argument.
 * Used to register the parameter symbol in the variable resolution.
 */
export interface InlineBinding {
    readonly paramSymbol: ts.Symbol;
    readonly argExpression: ts.Expression;
}
/**
 * Analyze the call graph to identify async helper functions eligible for
 * CFG-level inlining. Returns a map from function symbol to helper info.
 *
 * Supports transitive inlining — helper A can call helper B, which calls
 * helper C. The compiler inlines them bottom-up (leaf helpers first).
 *
 * A function is eligible if:
 * - It is `async`
 * - It is declared at module scope (top-level)
 * - Parameters are simple identifiers, object destructuring, or have defaults
 *   (no rest params, array destructuring, nested destructuring, or computed keys)
 * - It is not recursive (already enforced by call graph)
 * - All callee helpers are themselves eligible
 * - It is called from the entry point (reachable in call graph)
 */
export declare function analyzeHelperFunctions(context: CompilerContext, callGraph: CallGraphNode, sourceFile: ts.SourceFile): Map<ts.Symbol, InlinableHelper>;
//# sourceMappingURL=asyncHelperAnalyzer.d.ts.map