import { type WalkerEnter } from 'oxc-walker'; import { RolldownMagicString } from 'rolldown'; import type { AstTransformResult } from './transform.ts'; type OxcTransformOptions = { code: string; filename: string; sourcemap: boolean; createVisitor(editor: RolldownMagicString): WalkerEnter; }; /** * Parses once with Rolldown's Oxc parser and applies precise edits through its native Rust MagicString. * * These adapters previously used Babel plugins for one or two local range changes. Babel then * cloned and regenerated the complete module, which was unnecessary work for large dependency * sources and changed formatting outside the intended edit. Sharing Rolldown's parser and editor * keeps one AST implementation across Vite's build engine and these transforms while preserving * untouched source exactly. Callers provide only a visitor, so parsing, diagnostics, source-map * policy, and result normalization cannot drift between adapters. */ export declare function transformWithOxcWalker({ code, filename, sourcemap, createVisitor }: OxcTransformOptions): AstTransformResult; export {};