persona-community-5/.pnpm-store/v3/files/3b/e26d04d57ba2fa32fdedbf98ee0e52fe537f6e74d8fd8cb0e2d6de55a8882b7b6a52c4e2da8e37699dc3b3e3b236f8ce6c82ba992a62810955f4d1edf01c8b
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

73 lines
2.1 KiB
Plaintext

/**
* WARNING: This entrypoint is only available starting with `react-dom@18.0.0-rc.1`
*/
// See https://github.com/facebook/react/blob/main/packages/react-dom/client.js to see how the exports are declared,
import React = require("react");
export interface HydrationOptions {
/**
* Prefix for `useId`.
*/
identifierPrefix?: string;
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void;
}
export interface RootOptions {
/**
* Prefix for `useId`.
*/
identifierPrefix?: string;
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void;
}
export interface ErrorInfo {
digest?: string;
componentStack?: string;
}
export interface Root {
render(children: React.ReactNode): void;
unmount(): void;
}
/**
* Different release channels declare additional types of ReactNode this particular release channel accepts.
* App or library types should never augment this interface.
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS {}
export type Container =
| Element
| DocumentFragment
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS[
keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS
];
/**
* createRoot lets you create a root to display React components inside a browser DOM node.
*
* @see {@link https://react.dev/reference/react-dom/client/createRoot API Reference for `createRoot`}
*/
export function createRoot(container: Container, options?: RootOptions): Root;
/**
* Same as `createRoot()`, but is used to hydrate a container whose HTML contents were rendered by ReactDOMServer.
*
* React will attempt to attach event listeners to the existing markup.
*
* **Example Usage**
*
* ```jsx
* hydrateRoot(document.querySelector('#root'), <App />)
* ```
*
* @see https://reactjs.org/docs/react-dom-client.html#hydrateroot
*/
export function hydrateRoot(
container: Element | Document,
initialChildren: React.ReactNode,
options?: HydrationOptions,
): Root;