import type { Plugin } from 'vite'; import MagicString from 'magic-string'; import type { OptionsContext } from './context.js'; /** * Rewrites native `#private` class members into computed keys backed by * `Symbol.for(...)`. The key is stable across re-evaluations of the module, * so instances built by an earlier evaluation of a class and methods copied * from a later one agree on where private state lives. That is what lets HMR * patch a class in place. Private members esbuild already lowered get the * same treatment through their slots. Returns `null` when there is nothing to * rewrite or the module can't be handled safely. */ export declare const rewritePrivateNames: (code: string, id: string) => { code: string; map: ReturnType; } | null; /** * Dev-only transform that swaps native `#private` class members for stable * symbol keys so HMR's in-place class patching keeps working. See * {@link rewritePrivateNames}. Gates itself on the context's options, which * are only resolved against the loaded env after the plugin array is built. */ export declare const litPrivateFields: (ctx: OptionsContext) => Plugin; //# sourceMappingURL=private-fields.d.ts.map