/**
 * The logic for `createInjectionTransformStream` was strongly inspired by `createHeadInsertionTransformStream`
 * from https://github.com/vercel/next.js/blob/6481c92038cce43056005c07f80f2938faf29c29/packages/next/src/server/node-web-streams-helper.ts
 *
 * released under a MIT license (https://github.com/vercel/next.js/blob/6481c92038cce43056005c07f80f2938faf29c29/packages/next/license.md)
 * by Vercel, Inc., marked Copyright (c) 2023 Vercel, Inc.
 */
import * as React from "react";
/**
 * > This export is only available in streaming SSR Server environments
 *
 * Used to create a `TransformStream` that can be used for piping a React stream rendered by
 * `renderToReadableStream` and using the callback to insert chunks of HTML between React Chunks.
 */
export declare function createInjectionTransformStream(): {
    /**
     * @example
     * ```js
     * const { injectIntoStream, transformStream } = createInjectionTransformStream();
     * const App = render({ assets, injectIntoStream });
     * const reactStream = await renderToReadableStream(App, { bootstrapModules }));
     * await pipeReaderToResponse(
     *   reactStream.pipeThrough(transformStream).getReader(),
     *   response
     * );
     *  ```
     */
    transformStream: TransformStream;
    /**
     * `injectIntoStream` method that can be injected into your React application, to be made available to
     *
     * @example
     * ```js title="setup"
     * // create a Context for injection of `injectIntoStream`
     * const InjectionContext = React.createContext<
     *   (callback: () => React.ReactNode) => void
     * >(() => {});
     * // to be used in your application
     * export const InjectionContextProvider = InjectionContext.Provider;
     * // make it accessible to `WrapApolloProvider`
     * export const WrappedApolloProvider = WrapApolloProvider(
     *   buildManualDataTransport({
     *     useInsertHtml() {
     *       return React.useContext(InjectionContext);
     *     },
     *   })
     * );
     * ```
     * Then in your applications SSR render, pass this function to `InjectionContextProvider`:
     * ```js
     * <InjectionContextProvider value={injectIntoStream}>
     * ```
     */
    injectIntoStream: (callback: () => React.ReactNode) => void;
};
//# sourceMappingURL=createInjectionTransformStream.d.ts.map