//#region src/plugins/transform-cache.d.ts
/**
 * Memoizes a pure per-module transform across the repeated build passes
 * (scan client/server references + rsc/client/ssr builds), which feed the
 * same module source through the same transform up to five times.
 *
 * Entries are keyed by module id and replaced when the source changes, so dev
 * rebuilds retain at most one source version per id. `variant` distinguishes
 * results that also depend on an environment-derived input (e.g. the
 * typeof-window replacement); callers must pass a primitive or stable
 * reference. Cached values include `null` ("no transform applies") so the
 * negative case is not recomputed either.
 *
 * Only safe for transforms whose result depends solely on (id, source,
 * variant) — no filesystem or plugin-state reads inside `compute`.
 */
declare function createTransformCache<V, R>(): (id: string, source: string, variant: V, compute: () => R) => R;
//#endregion
export { createTransformCache };