/** * postgres-mcp — Code Mode Auto-Return Transform * * Transforms user code so the last expression statement is implicitly * returned from the async IIFE wrapper. Mimics Node REPL / Chrome * DevTools semantics where bare expressions surface their value. * * The transform is intentionally heuristic (string-based, not AST) * because the code runs in a sandboxed vm.Script that already * handles syntax errors. Edge-case misfires are safe — they either * produce a benign return of the last expression or leave the code * unchanged (returning undefined, the previous behavior). */ /** * Transform user code so the last expression statement gets an * implicit `return`, enabling the IIFE wrapper to propagate the value. * * Examples: * `pg.help()` → `return pg.help()` * `const r = await foo(); r` → `const r = await foo(); return r` * `return 42` → `return 42` (no change) * `for (const x of xs) { ... }` → unchanged (control flow) */ export declare function transformAutoReturn(code: string): string; //# sourceMappingURL=auto-return.d.ts.map