import { JSX, ReactElement, ReactNode } from 'react'; export declare function isFunctionComponent(reactNode: ReactNode): reactNode is ReactElement>; /** * Checks if a ReactNode matches a specific component display name. * @param reactNode - a ReactNode single child * @param displayNames - a list of names of the components we would like to match * @returns a boolean value indicating argument match the passed displayNames * * @example * ```jsx * React.Children.map(children, (child) => * isSpecificReactComponent(child, [/^Button$/]) * ) * // will return an array of true/false values depending if some child is a button * ``` */ export declare function isSpecificReactComponent(reactNode: ReactNode, displayNames: RegExp[]): reactNode is JSX.Element; /** * Checks if a ReactNode matches a specific JSX tag. * @param reactNode - a ReactNode single child * @param tagNames - a list of names of the jsx tags we would like to match * @returns a boolean value indicating argument match the passed displayNames * * @example * ```jsx * React.Children.map(children, (child) => * isSpecificJsxTag(child, ['button', 'input']) * ) * // will return an array of true/false values depending if some child is a button * ``` */ export declare function isSpecificJsxTag(reactNode: ReactNode, tagNames: string[]): reactNode is JSX.Element; export declare function getInnerText(reactNode: ReactNode): string; /** * Filter an `Element` looking for all children with the given `displayName`. * * @example * ```tsx * filterByDisplayName(children, /^Hooked/) * // will return an array of all children with a displayName starting with `Hooked*` * ``` */ export declare function filterByDisplayName(children: React.ReactNode, displayName: RegExp): JSX.Element[];