Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
35 lines
1.1 KiB
Plaintext
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 |