/** * react-dom v16.x.x libdefs from flow-typed * * @noformat */ declare module 'react-dom' { declare function findDOMNode( componentOrElement: Element | ?React$Component, ): null | Element | Text; declare function render( element: React$Element, container: Element, callback?: () => void, ): React$ElementRef; declare function hydrate( element: React$Element, container: Element, callback?: () => void, ): React$ElementRef; declare function createPortal( node: React$Node, container: Element, ): React$Portal; declare function unmountComponentAtNode(container: any): boolean; declare var version: string; declare function unstable_batchedUpdates( callback: (a: A, b: B, c: C, d: D, e: E) => mixed, a: A, b: B, c: C, d: D, e: E, ): void; declare function unstable_renderSubtreeIntoContainer< ElementType: React$ElementType, >( parentComponent: React$Component, nextElement: React$Element, container: any, callback?: () => void, ): React$ElementRef; } declare module 'react-dom/server' { declare function renderToString(element: React$Node): string; declare function renderToStaticMarkup(element: React$Node): string; declare function renderToNodeStream(element: React$Node): stream$Readable; declare function renderToStaticNodeStream( element: React$Node, ): stream$Readable; declare var version: string; } type Thenable = { then(resolve: () => mixed, reject?: () => mixed): mixed, ... }; declare module 'react-dom/test-utils' { declare var Simulate: { [eventName: string]: (element: Element, eventData?: Object) => void, ... }; declare function renderIntoDocument( instance: React$Element, ): React$Component; declare function mockComponent( componentClass: React$ElementType, mockTagName?: string, ): Object; declare function isElement(element: React$Element): boolean; declare function isElementOfType( element: React$Element, componentClass: React$ElementType, ): boolean; declare function isDOMComponent(instance: any): boolean; declare function isCompositeComponent( instance: React$Component, ): boolean; declare function isCompositeComponentWithType( instance: React$Component, componentClass: React$ElementType, ): boolean; declare function findAllInRenderedTree( tree: React$Component, test: (child: React$Component) => boolean, ): Array>; declare function scryRenderedDOMComponentsWithClass( tree: React$Component, className: string, ): Array; declare function findRenderedDOMComponentWithClass( tree: React$Component, className: string, ): ?Element; declare function scryRenderedDOMComponentsWithTag( tree: React$Component, tagName: string, ): Array; declare function findRenderedDOMComponentWithTag( tree: React$Component, tagName: string, ): ?Element; declare function scryRenderedComponentsWithType( tree: React$Component, componentClass: React$ElementType, ): Array>; declare function findRenderedComponentWithType( tree: React$Component, componentClass: React$ElementType, ): ?React$Component; declare function act(callback: () => void | Thenable): Thenable; }