PromoCursed/node_modules/rc-util/es/Dom/findDOMNode.d.ts
2024-08-20 23:25:37 +04:00

13 lines
476 B
TypeScript

import React from 'react';
export declare function isDOM(node: any): node is HTMLElement | SVGElement;
/**
* Retrieves a DOM node via a ref, and does not invoke `findDOMNode`.
*/
export declare function getDOM(node: any): HTMLElement | SVGElement | null;
/**
* Return if a node is a DOM node. Else will return by `findDOMNode`
*/
export default function findDOMNode<T = Element | Text>(node: React.ReactInstance | HTMLElement | SVGElement | {
nativeElement: T;
}): T;