import type React from "react";
export declare function createReactFetcher({ moduleBaseURL, publicOrigin, url, indexRSC, headers, }?: {
    url?: string;
    moduleBaseURL?: string;
    publicOrigin?: string;
    indexRSC?: string;
    headers?: HeadersInit;
}): PromiseLike<React.ReactNode>;
/** HMR event name used by the plugin */
export declare const RSC_HMR_EVENT = "vite-plugin-react-server:server-component-update";
/** Data sent with RSC HMR events */
export interface RscHmrData {
    file: string;
    path: string;
}
/**
 * Set up HMR for React Server Components (non-React API).
 *
 * For React components, use `useRscHmr()` hook instead.
 *
 * @example
 * ```tsx
 * import { setupRscHmr } from 'vite-plugin-react-server/utils';
 *
 * // Default: refetch current page's RSC stream (smart refresh)
 * setupRscHmr();
 *
 * // Custom handler
 * setupRscHmr({
 *   onUpdate: async (data) => {
 *     console.log('Changed:', data.file);
 *     myCustomRefetch();
 *   }
 * });
 * ```
 */
export declare function setupRscHmr(options?: {
    /**
     * Custom handler for server component updates.
     * If not provided, defaults to refetching the RSC stream for the current page.
     * Set to `'reload'` for full page reload behavior.
     */
    onUpdate?: ((data: RscHmrData) => void | Promise<void>) | 'reload';
    /**
     * Whether to log HMR events to console.
     * @default true in development
     */
    verbose?: boolean;
}): void;
//# sourceMappingURL=createReactFetcher.d.ts.map