import type { RehydrationCache } from "./types.js";
import type { QueryEvent } from "@apollo/client-react-streaming";
import type { Revive, Stringify } from "./serialization.js";
export type DataTransport<T> = Array<T> | {
    push(...args: T[]): void;
};
type DataToTransport = {
    rehydrate: RehydrationCache;
    events: QueryEvent[];
};
/**
 * Returns a string of JavaScript that can be used to transport data to the client.
 */
export declare function transportDataToJS(data: DataToTransport, stringify: Stringify): string;
/**
 * Registers a lazy queue that will be filled with data by `transportDataToJS`.
 * All incoming data will be added either to the rehydration cache or the result cache.
 */
export declare function registerDataTransport({ onQueryEvent, onRehydrate, revive, }: {
    onQueryEvent(event: QueryEvent): void;
    onRehydrate(rehydrate: RehydrationCache): void;
    revive: Revive;
}): void;
export {};
//# sourceMappingURL=dataTransport.d.ts.map