import { ReactElement } from 'react'; import { Fiber } from 'react-reconciler'; export { Fiber } from 'react-reconciler'; interface QueryOptions { /** Include the element itself in the results if it matches the predicate. Defaults to false. */ includeSelf?: boolean; /** Exclude any ancestors of deepest matched elements even if they match the predicate. Defaults to false. */ matchDeepestOnly?: boolean; } type JsonNode = JsonElement | string; type JsonElement = { type: string; props: object; children: Array | null; $$typeof: symbol; }; type HostNode = HostElement | string; type HostElementProps = Record; declare class HostElement { private instance; private constructor(); get type(): string; get props(): HostElementProps; get parent(): HostElement | null; get children(): HostNode[]; get unstable_fiber(): Fiber | null; toJSON(): JsonElement | null; queryAll(predicate: (element: HostElement, options?: QueryOptions) => boolean, options?: QueryOptions): HostElement[]; } type RootOptions = { /** Types of valid text components. */ textComponents?: string[]; createNodeMock?: (element: ReactElement) => object; /** Callback called when React catches an error in an Error Boundary. Called with the error caught by the Error Boundary, and an errorInfo object containing the componentStack. */ onCaughtError?: ErrorHandler; /** Callback called when an error is thrown and not caught by an Error Boundary. Called with the error that was thrown, and an errorInfo object containing the componentStack. */ onUncaughtError?: ErrorHandler; /** Callback called when React automatically recovers from errors. Called with an error React throws, and an errorInfo object containing the componentStack. Some recoverable errors may include the original error cause as error.cause. */ onRecoverableError?: ErrorHandler; /** A string prefix React uses for IDs generated by useId. Useful to avoid conflicts when using multiple roots on the same page. */ identifierPrefix?: string; isStrictMode?: boolean; }; type ErrorHandler = (error: unknown, errorInfo: ErrorInfo) => void; type ErrorInfo = { componentStack: string; }; type Root = { render: (element: ReactElement) => void; unmount: () => void; container: HostElement; }; declare function createRoot(options?: RootOptions): Root; export { type ErrorHandler, type ErrorInfo, HostElement, type HostElementProps, type HostNode, type JsonElement, type JsonNode, type QueryOptions, type Root, type RootOptions, createRoot };