import type * as acorn from 'acorn'; import type { TransformConfig } from './interfaces'; /** * Transform AST by prefixing identifiers based on mode * * **Blacklist Mode (default):** * Transforms only identifiers specified in the list: * console.log('hello'); → __safe_console.log('hello'); * obj['eval'](); → obj['__safe_eval'](); * * **Whitelist Mode:** * Transforms ALL identifiers except those in the whitelist: * const data = users.filter(u => u.active); * → const __safe_data = __safe_users.filter(__safe_u => __safe_u.active); * (assuming 'users' is whitelisted, but 'data', 'u', 'filter' are not) * * @param ast The AST to transform (will be mutated in place) * @param config Transformation configuration */ export declare function transformAst(ast: acorn.Node, config: TransformConfig): void; /** * Generate JavaScript code from an AST * * @param ast The AST to generate code from * @returns Generated JavaScript code */ export declare function generateCode(ast: acorn.Node): string; /** * Transform JavaScript code by prefixing identifiers * * This is a convenience function that combines parsing, transforming, and code generation. * For better performance when you already have an AST, use transformAst() directly. * * @param code JavaScript code to transform * @param config Transformation configuration * @param ast Optional pre-parsed AST (if not provided, code will be parsed) * @returns Transformed JavaScript code */ export declare function transformCode(code: string, config: TransformConfig, ast?: acorn.Node): string;