Files
SnowLuma/.pnpm-store/v11/files/2f/f71a38b790545747770f0e7f99a02dd4374b693c3174ec7babc1affd59129118a9ba8f606847f86a1c1725a4ecbbbfff6b79d24c0f9f9238edb1343fc7418a
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

35 lines
1.1 KiB
Plaintext

import { HtmlEscapedString } from "../utils/html.js";
import { PropsWithChildren } from "./types.js";
import { Context } from "./context.js";
import { FC, JSXNode } from "./base.js";
//#region src/jsx/streaming.d.ts
/**
* Used to specify nonce for scripts generated by `Suspense` and `ErrorBoundary`.
*
* @example
* ```tsx
* <StreamingContext.Provider value={{ scriptNonce: 'test-nonce' }}>
* <Suspense fallback={<p>Loading...</p>}>
* <Content />
* </Suspense>
* </StreamingContext.Provider>
* ```
*/
export declare const StreamingContext: Context<{
scriptNonce: string;
} | null>;
/**
* @experimental
* `Suspense` is an experimental feature.
* The API might be changed.
*/
export declare const Suspense: FC<PropsWithChildren<{
fallback: any;
}>>;
/**
* @experimental
* `renderToReadableStream()` is an experimental feature.
* The API might be changed.
*/
export declare const renderToReadableStream: (content: HtmlEscapedString | JSXNode | Promise<HtmlEscapedString>, onError?: (e: unknown) => string | void) => ReadableStream<Uint8Array>;
//#endregion