// NOTE: Users of the `experimental` builds of React should add a reference // to 'react-dom/experimental' in their project. See experimental.d.ts's top comment // for reference and documentation on how exactly to do it. export as namespace ReactDOM; import { CElement, Component, ComponentState, DOMAttributes, DOMElement, FunctionComponentElement, ReactElement, ReactInstance, ReactNode, ReactPortal, } from "react"; export function findDOMNode(instance: ReactInstance | null | undefined): Element | null | Text; export function unmountComponentAtNode(container: Element | DocumentFragment): boolean; export function createPortal( children: ReactNode, container: Element | DocumentFragment, key?: null | string, ): ReactPortal; export const version: string; export const render: Renderer; export const hydrate: Renderer; export function flushSync(fn: () => R): R; export function flushSync(fn: (a: A) => R, a: A): R; export function unstable_batchedUpdates(callback: (a: A) => R, a: A): R; export function unstable_batchedUpdates(callback: () => R): R; export function unstable_renderSubtreeIntoContainer( parentComponent: Component, element: DOMElement, T>, container: Element, callback?: (element: T) => any, ): T; export function unstable_renderSubtreeIntoContainer>( parentComponent: Component, element: CElement, container: Element, callback?: (component: T) => any, ): T; export function unstable_renderSubtreeIntoContainer

( parentComponent: Component, element: ReactElement

, container: Element, callback?: (component?: Component | Element) => any, // eslint-disable-next-line @typescript-eslint/no-invalid-void-type ): Component | Element | void; export type Container = Element | Document | DocumentFragment; export interface Renderer { // Deprecated(render): The return value is deprecated. // In future releases the render function's return type will be void. ( element: DOMElement, T>, container: Container | null, callback?: () => void, ): T; ( element: Array, any>>, container: Container | null, callback?: () => void, ): Element; ( element: FunctionComponentElement | Array>, container: Container | null, callback?: () => void, ): void; >( element: CElement, container: Container | null, callback?: () => void, ): T; ( element: Array>>, container: Container | null, callback?: () => void, ): Component;

( element: ReactElement

, container: Container | null, callback?: () => void, // eslint-disable-next-line @typescript-eslint/no-invalid-void-type ): Component | Element | void; ( element: ReactElement[], container: Container | null, callback?: () => void, // eslint-disable-next-line @typescript-eslint/no-invalid-void-type ): Component | Element | void; }